effectual 0.5.5__tar.gz → 0.5.6__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {effectual-0.5.5 → effectual-0.5.6}/PKG-INFO +3 -2
- {effectual-0.5.5 → effectual-0.5.6}/README.md +2 -1
- {effectual-0.5.5 → effectual-0.5.6}/pyproject.toml +1 -1
- {effectual-0.5.5 → effectual-0.5.6}/src/effectual/build.py +4 -24
- effectual-0.5.6/src/effectual/treeshake.py +19 -0
- {effectual-0.5.5 → effectual-0.5.6}/uv.lock +1 -1
- {effectual-0.5.5 → effectual-0.5.6}/.gitignore +0 -0
- {effectual-0.5.5 → effectual-0.5.6}/.python-version +0 -0
- {effectual-0.5.5 → effectual-0.5.6}/LICENSE +0 -0
- {effectual-0.5.5 → effectual-0.5.6}/src/effectual/__init__.py +0 -0
- {effectual-0.5.5 → effectual-0.5.6}/src/effectual/colors.py +0 -0
- {effectual-0.5.5 → effectual-0.5.6}/src/effectual/config.py +0 -0
- {effectual-0.5.5 → effectual-0.5.6}/src/effectual/developer.py +0 -0
- {effectual-0.5.5 → effectual-0.5.6}/src/effectual/transformations.py +0 -0
- {effectual-0.5.5 → effectual-0.5.6}/taskfile.yml +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: effectual
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.6
|
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>
|
@@ -79,7 +79,8 @@ This is like what what [Rollup](https://rollupjs.org/) does for vite
|
|
79
79
|
# To be added
|
80
80
|
|
81
81
|
- [Treeshaking](https://webpack.js.org/guides/tree-shaking/)
|
82
|
-
-
|
82
|
+
- Rewriting some time critical parts in Rust 🚀🦀
|
83
|
+
- Cross platform compatibility
|
83
84
|
- Plugin and loader system
|
84
85
|
|
85
86
|
# Contributions
|
@@ -56,7 +56,8 @@ This is like what what [Rollup](https://rollupjs.org/) does for vite
|
|
56
56
|
# To be added
|
57
57
|
|
58
58
|
- [Treeshaking](https://webpack.js.org/guides/tree-shaking/)
|
59
|
-
-
|
59
|
+
- Rewriting some time critical parts in Rust 🚀🦀
|
60
|
+
- Cross platform compatibility
|
60
61
|
- Plugin and loader system
|
61
62
|
|
62
63
|
# Contributions
|
@@ -10,7 +10,8 @@ from watch_lite import getHash
|
|
10
10
|
|
11
11
|
from .colors import completeColor, fileColor, folderColor, tagColor
|
12
12
|
from .config import dumpHashes, loadConfig, loadToml
|
13
|
-
from .transformations import
|
13
|
+
from .transformations import minifyToString
|
14
|
+
from .treeshake import cleanPackages
|
14
15
|
|
15
16
|
|
16
17
|
def bundleFiles(
|
@@ -73,12 +74,7 @@ def dependencies(minify: bool) -> None:
|
|
73
74
|
)
|
74
75
|
|
75
76
|
if len(packages) != 0:
|
76
|
-
arguments: list[str] = [
|
77
|
-
"--no-compile",
|
78
|
-
"--quiet",
|
79
|
-
"--no-binary=none",
|
80
|
-
"--no-cache",
|
81
|
-
]
|
77
|
+
arguments: list[str] = ["--no-compile", "--quiet", "--no-binary=none"]
|
82
78
|
|
83
79
|
pathToInstallTo: str = "./.effectual_cache/cachedPackages"
|
84
80
|
argumentString: str = " ".join(arguments)
|
@@ -97,23 +93,7 @@ def dependencies(minify: bool) -> None:
|
|
97
93
|
multiprocessing = importlib.import_module("multiprocessing")
|
98
94
|
|
99
95
|
with multiprocessing.Pool(processes=multiprocessing.cpu_count()) as pool:
|
100
|
-
pool.map(
|
101
|
-
|
102
|
-
|
103
|
-
def optimizeDependencies(file: Path) -> None:
|
104
|
-
stringFile: str = str(file)
|
105
|
-
if (
|
106
|
-
file.suffix in (".pyc", ".pyd", ".exe", ".typed")
|
107
|
-
or "__pycache__" in stringFile
|
108
|
-
or ".dist-info" in stringFile
|
109
|
-
or ".lock" in stringFile
|
110
|
-
):
|
111
|
-
try:
|
112
|
-
file.unlink()
|
113
|
-
except PermissionError:
|
114
|
-
pass
|
115
|
-
elif file.suffix == ".py":
|
116
|
-
minifyFile(file)
|
96
|
+
pool.map(cleanPackages, Path(pathToInstallTo).rglob("*"))
|
117
97
|
|
118
98
|
|
119
99
|
def main() -> None:
|
@@ -0,0 +1,19 @@
|
|
1
|
+
from pathlib import Path
|
2
|
+
|
3
|
+
from transformations import minifyFile
|
4
|
+
|
5
|
+
|
6
|
+
def cleanPackages(file: Path) -> None:
|
7
|
+
stringFile: str = str(file)
|
8
|
+
if (
|
9
|
+
file.suffix in (".pyc", ".pyd", ".exe", ".typed")
|
10
|
+
or "__pycache__" in stringFile
|
11
|
+
or ".dist-info" in stringFile
|
12
|
+
or ".lock" in stringFile
|
13
|
+
):
|
14
|
+
try:
|
15
|
+
file.unlink()
|
16
|
+
except PermissionError:
|
17
|
+
pass
|
18
|
+
elif file.suffix == ".py":
|
19
|
+
minifyFile(file)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|