effectual 0.5.5__py3-none-any.whl → 0.5.7__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 +4 -24
- effectual/treeshake.py +19 -0
- {effectual-0.5.5.dist-info → effectual-0.5.7.dist-info}/METADATA +3 -2
- {effectual-0.5.5.dist-info → effectual-0.5.7.dist-info}/RECORD +7 -6
- {effectual-0.5.5.dist-info → effectual-0.5.7.dist-info}/WHEEL +0 -0
- {effectual-0.5.5.dist-info → effectual-0.5.7.dist-info}/entry_points.txt +0 -0
- {effectual-0.5.5.dist-info → effectual-0.5.7.dist-info}/licenses/LICENSE +0 -0
effectual/build.py
CHANGED
@@ -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:
|
effectual/treeshake.py
ADDED
@@ -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)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: effectual
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.7
|
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
|
@@ -1,11 +1,12 @@
|
|
1
1
|
effectual/__init__.py,sha256=Hg_RSVgpLZvaeBUqt5uL_r5YIDsVdKPcFE2L5WJVYbM,482
|
2
|
-
effectual/build.py,sha256=
|
2
|
+
effectual/build.py,sha256=c1GyLhIqybBhED8eou8B7GOXwpmeSWvxpv4PBkYgLtQ,5463
|
3
3
|
effectual/colors.py,sha256=na7SEUSXM7aHvEKeIAn5shrZJtrBYq_ZUp121GRO_PQ,1411
|
4
4
|
effectual/config.py,sha256=Z99V7AnJpSWuo-aEz10TDj5BAaT7tboGJUjggj-HQh4,1798
|
5
5
|
effectual/developer.py,sha256=D_KX6YYWgHF5b6ri-48ai1RqxqiIqZ0Rw-dVHG9NLHE,2052
|
6
6
|
effectual/transformations.py,sha256=7GHgQWzin2J1W62yMReHXaYIChXc3f0rNJA-yY4LDEI,1313
|
7
|
-
effectual
|
8
|
-
effectual-0.5.
|
9
|
-
effectual-0.5.
|
10
|
-
effectual-0.5.
|
11
|
-
effectual-0.5.
|
7
|
+
effectual/treeshake.py,sha256=_6poBa-Z1w8FiWzY3-KJabPCbdA8K7XaZs5xSGrdGjI,486
|
8
|
+
effectual-0.5.7.dist-info/METADATA,sha256=BK1f6aSsUeosQ2IA9mZQkGn9teibuMghZD36s2ja7tU,2587
|
9
|
+
effectual-0.5.7.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
10
|
+
effectual-0.5.7.dist-info/entry_points.txt,sha256=1W7EjlLZkw_Wz8V1SgdzzDis-CRE5IINyg74upsB0zU,40
|
11
|
+
effectual-0.5.7.dist-info/licenses/LICENSE,sha256=RrVXS_K_FctToNx9BLuZm9vbcpTi3PHNzWMaz7QyVeg,1082
|
12
|
+
effectual-0.5.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|