effectual 0.8.0__tar.gz → 0.8.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: effectual
3
- Version: 0.8.0
3
+ Version: 0.8.1.1
4
4
  Summary: A python package/script bundler
5
5
  Project-URL: Homepage, https://github.com/effectualpy/effectual
6
6
  Author-email: jake <jakewdr@proton.me>
@@ -11,6 +11,7 @@ Classifier: Programming Language :: Python :: 3.10
11
11
  Classifier: Programming Language :: Python :: 3.11
12
12
  Classifier: Programming Language :: Python :: 3.12
13
13
  Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Programming Language :: Python :: 3.14
14
15
  Classifier: Programming Language :: Python :: Implementation :: CPython
15
16
  Requires-Python: >=3.9
16
17
  Requires-Dist: click>=8.1.7
@@ -108,8 +109,9 @@ To build the project from source you need two tools:
108
109
 
109
110
  1) CD to your effectual directory and run:
110
111
 
111
- task setup
112
+ task setup
113
+
112
114
 
113
115
  2) Then to build an distributable tar.gz and wheel:
114
116
 
115
- task build
117
+ task build
@@ -86,8 +86,9 @@ To build the project from source you need two tools:
86
86
 
87
87
  1) CD to your effectual directory and run:
88
88
 
89
- task setup
89
+ task setup
90
+
90
91
 
91
92
  2) Then to build an distributable tar.gz and wheel:
92
93
 
93
- task build
94
+ task build
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "effectual"
3
- version = "0.8.0"
3
+ version = "0.8.1.1"
4
4
  description = "A python package/script bundler"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -14,6 +14,7 @@ classifiers = [
14
14
  "Programming Language :: Python :: 3.11",
15
15
  "Programming Language :: Python :: 3.12",
16
16
  "Programming Language :: Python :: 3.13",
17
+ "Programming Language :: Python :: 3.14",
17
18
  "Programming Language :: Python :: Implementation :: CPython",
18
19
  ]
19
20
 
@@ -1,6 +1,4 @@
1
- import hashlib
2
1
  import os
3
- import shutil
4
2
  import zipfile
5
3
  from pathlib import Path
6
4
  from time import perf_counter
@@ -8,6 +6,7 @@ from typing import Any
8
6
 
9
7
  from .colors import completeColor, fileColor, folderColor, tagColor
10
8
  from .config import dumpHashes, loadConfig, loadToml
9
+ from .lib import getHash
11
10
  from .transformations import minifyFile, minifyToString
12
11
 
13
12
 
@@ -91,7 +90,7 @@ def dependencies() -> None:
91
90
  argumentString: str = " ".join(arguments)
92
91
 
93
92
  if Path(pathToInstallTo).exists():
94
- shutil.rmtree(pathToInstallTo)
93
+ __import__("shutil").rmtree(pathToInstallTo)
95
94
 
96
95
  for key in packages:
97
96
  print(f"{tagColor('installing')} || {key}")
@@ -100,20 +99,6 @@ def dependencies() -> None:
100
99
  )
101
100
 
102
101
 
103
- def getHash(filePath: Path) -> str:
104
- """Creates an MD5 Hash from a file
105
-
106
- Args:
107
- filePath (Path): Path to the file
108
-
109
- Returns:
110
- str: String of the hash
111
- """
112
- with open(filePath, "rb") as file:
113
- fileHash = hashlib.md5(file.read()).hexdigest()
114
- return fileHash
115
-
116
-
117
102
  def main() -> None:
118
103
  """Entrypoint
119
104
 
@@ -1,4 +1,4 @@
1
- import io
1
+ from io import TextIOWrapper
2
2
  from pathlib import Path
3
3
  from typing import Any
4
4
 
@@ -37,7 +37,9 @@ def loadConfig(configPath: str = "./pyproject.toml") -> dict[Any, Any]:
37
37
  dict: Dictionary containing effectual config
38
38
  """
39
39
  configData: dict[str, Any] = loadToml(configPath)
40
- if configData is None:
40
+ try:
41
+ configData = configData["tool"]["effectual"]
42
+ except KeyError:
41
43
  configData = {
42
44
  "sourceDirectory": "./src/",
43
45
  "outputDirectory": "./dist/",
@@ -45,13 +47,11 @@ def loadConfig(configPath: str = "./pyproject.toml") -> dict[Any, Any]:
45
47
  "minification": True,
46
48
  "compressionLevel": 5,
47
49
  }
48
- else:
49
- configData = configData.get("tool").get("effectual")
50
50
 
51
51
  return configData
52
52
 
53
53
 
54
- def dumpHashes(hashesToDump: dict[str, dict[str, str]], file: io.TextIOWrapper) -> None:
54
+ def dumpHashes(hashesToDump: dict[str, dict[str, str]], file: TextIOWrapper) -> None:
55
55
  """Dumps hashes in a specific format to a toml file
56
56
 
57
57
  Args:
@@ -0,0 +1,16 @@
1
+ from hashlib import md5
2
+ from pathlib import Path
3
+
4
+
5
+ def getHash(filePath: Path) -> str:
6
+ """Creates an MD5 Hash from a file
7
+
8
+ Args:
9
+ filePath (Path): Path to the file
10
+
11
+ Returns:
12
+ str: String of the hash
13
+ """
14
+ with open(filePath, "rb") as file:
15
+ fileHash = md5(file.read()).hexdigest()
16
+ return fileHash
@@ -164,7 +164,7 @@ wheels = [
164
164
 
165
165
  [[package]]
166
166
  name = "effectual"
167
- version = "0.8.0"
167
+ version = "0.8.1.1"
168
168
  source = { editable = "." }
169
169
  dependencies = [
170
170
  { name = "click" },
File without changes
File without changes
File without changes
File without changes