effectual 0.8.0__py3-none-any.whl → 0.8.1.1__py3-none-any.whl
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.
- effectual/build.py +2 -17
- effectual/config.py +5 -5
- effectual/lib.py +16 -0
- {effectual-0.8.0.dist-info → effectual-0.8.1.1.dist-info}/METADATA +5 -3
- effectual-0.8.1.1.dist-info/RECORD +12 -0
- effectual-0.8.0.dist-info/RECORD +0 -11
- {effectual-0.8.0.dist-info → effectual-0.8.1.1.dist-info}/WHEEL +0 -0
- {effectual-0.8.0.dist-info → effectual-0.8.1.1.dist-info}/entry_points.txt +0 -0
- {effectual-0.8.0.dist-info → effectual-0.8.1.1.dist-info}/licenses/LICENSE +0 -0
effectual/build.py
CHANGED
@@ -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
|
|
effectual/config.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
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
|
-
|
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:
|
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:
|
effectual/lib.py
ADDED
@@ -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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: effectual
|
3
|
-
Version: 0.8.
|
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
|
-
|
112
|
+
task setup
|
113
|
+
|
112
114
|
|
113
115
|
2) Then to build an distributable tar.gz and wheel:
|
114
116
|
|
115
|
-
|
117
|
+
task build
|
@@ -0,0 +1,12 @@
|
|
1
|
+
effectual/__init__.py,sha256=Hg_RSVgpLZvaeBUqt5uL_r5YIDsVdKPcFE2L5WJVYbM,482
|
2
|
+
effectual/build.py,sha256=RH3AqfNflj-vhHCszbGmVyP6FFSqTxkIkI96NoiaYNw,6027
|
3
|
+
effectual/colors.py,sha256=na7SEUSXM7aHvEKeIAn5shrZJtrBYq_ZUp121GRO_PQ,1411
|
4
|
+
effectual/config.py,sha256=3RvrlDY_W2YTGlpfcpWqkFGCFnui-vqigJuC-gQKMQs,1799
|
5
|
+
effectual/developer.py,sha256=sgh7p9iJXJd-R-Tx8nbeR3isS3ybXMtvhKIxzg3Kl9A,1988
|
6
|
+
effectual/lib.py,sha256=d8lgXD9Dv7WohFwHE_K1q9NjvfsdrTCRYmJBcDHmQY8,356
|
7
|
+
effectual/transformations.py,sha256=7GHgQWzin2J1W62yMReHXaYIChXc3f0rNJA-yY4LDEI,1313
|
8
|
+
effectual-0.8.1.1.dist-info/METADATA,sha256=4Npa97HXgDYOVooBB0LohjCKlgHuttJ6_-kX0hsiDmc,3399
|
9
|
+
effectual-0.8.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
10
|
+
effectual-0.8.1.1.dist-info/entry_points.txt,sha256=1W7EjlLZkw_Wz8V1SgdzzDis-CRE5IINyg74upsB0zU,40
|
11
|
+
effectual-0.8.1.1.dist-info/licenses/LICENSE,sha256=RrVXS_K_FctToNx9BLuZm9vbcpTi3PHNzWMaz7QyVeg,1082
|
12
|
+
effectual-0.8.1.1.dist-info/RECORD,,
|
effectual-0.8.0.dist-info/RECORD
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
effectual/__init__.py,sha256=Hg_RSVgpLZvaeBUqt5uL_r5YIDsVdKPcFE2L5WJVYbM,482
|
2
|
-
effectual/build.py,sha256=CoWaZD0lMAw4TiHmYfy4CzeNkttnKgHrfLWviZ2LeGI,6331
|
3
|
-
effectual/colors.py,sha256=na7SEUSXM7aHvEKeIAn5shrZJtrBYq_ZUp121GRO_PQ,1411
|
4
|
-
effectual/config.py,sha256=Z99V7AnJpSWuo-aEz10TDj5BAaT7tboGJUjggj-HQh4,1798
|
5
|
-
effectual/developer.py,sha256=sgh7p9iJXJd-R-Tx8nbeR3isS3ybXMtvhKIxzg3Kl9A,1988
|
6
|
-
effectual/transformations.py,sha256=7GHgQWzin2J1W62yMReHXaYIChXc3f0rNJA-yY4LDEI,1313
|
7
|
-
effectual-0.8.0.dist-info/METADATA,sha256=etnnwahupwpP7bkA6cUBtOd80ZyISkFiJunjeGQWFCg,3336
|
8
|
-
effectual-0.8.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
9
|
-
effectual-0.8.0.dist-info/entry_points.txt,sha256=1W7EjlLZkw_Wz8V1SgdzzDis-CRE5IINyg74upsB0zU,40
|
10
|
-
effectual-0.8.0.dist-info/licenses/LICENSE,sha256=RrVXS_K_FctToNx9BLuZm9vbcpTi3PHNzWMaz7QyVeg,1082
|
11
|
-
effectual-0.8.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|