effectual 0.7.5__py3-none-any.whl → 0.7.7__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
effectual/build.py CHANGED
@@ -41,11 +41,17 @@ def bundleFiles(
41
41
  cachePath: Path = Path("./.effectual_cache/cachedPackages")
42
42
  if cachePath.exists():
43
43
  if Path.iterdir(cachePath):
44
- totalSize: int = int(0)
44
+ totalSize: int = sum(
45
+ cachedFile.stat().st_size
46
+ for cachedFile in cachePath.rglob("*")
47
+ if cachedFile.is_file()
48
+ )
49
+ print(
50
+ f"{tagColor('bundling')} || uv dependencies {folderColor(totalSize)}" # noqa: E501
51
+ )
45
52
  for cachedFile in cachePath.rglob("*"):
46
53
  if cachedFile.is_dir() and not any(cachedFile.iterdir()):
47
54
  continue
48
- totalSize += cachedFile.stat().st_size
49
55
  stringCachedFile = str(cachedFile)
50
56
  if (
51
57
  cachedFile.suffix
@@ -61,10 +67,6 @@ def bundleFiles(
61
67
  arcName: str = str(cachedFile.relative_to(cachePath))
62
68
  bundler.write(cachedFile, arcname=arcName)
63
69
 
64
- print(
65
- f"{tagColor('bundling')} || uv dependencies {folderColor(totalSize)}" # noqa: E501
66
- )
67
-
68
70
  for pyFile in sourceDirectory.rglob("*.py"):
69
71
  print(f"{tagColor('bundling')} || {pyFile.name} {fileColor(pyFile)}")
70
72
  if minification:
effectual/developer.py CHANGED
@@ -1,3 +1,5 @@
1
+ import os
2
+ import signal
1
3
  import subprocess
2
4
  import time
3
5
  import zipfile
@@ -41,12 +43,20 @@ def main() -> None:
41
43
  bundle(sourceDirectory, outputFile)
42
44
  runCommand = subprocess.Popen(["uv", "run", outputFile], shell=True)
43
45
 
44
- for change in watch(sourceDirectory, debounce=50):
46
+ pidSet: set = set()
47
+
48
+ for change in watch(sourceDirectory, debounce=600):
49
+ print(pidSet)
45
50
  print(f"{tagColor('reloaded')} || file change detected")
46
- runCommand.kill()
47
- runCommand.wait()
51
+ for pid in pidSet.copy():
52
+ try:
53
+ os.kill(pid, signal.SIGTERM)
54
+ except OSError:
55
+ pass
56
+ pidSet.remove(pid)
48
57
  bundle(sourceDirectory, outputFile)
49
58
  runCommand = subprocess.Popen(["uv", "run", outputFile], shell=True)
59
+ pidSet.add(runCommand.pid)
50
60
 
51
61
 
52
62
  if __name__ == "__main__":
@@ -1,10 +1,11 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: effectual
3
- Version: 0.7.5
3
+ Version: 0.7.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>
7
- License: MIT
7
+ License-Expression: MIT
8
+ License-File: LICENSE
8
9
  Classifier: Programming Language :: Python :: 3.8
9
10
  Classifier: Programming Language :: Python :: 3.9
10
11
  Classifier: Programming Language :: Python :: 3.10
@@ -88,8 +89,9 @@ This is like what what [Rollup](https://rollupjs.org/) does for vite
88
89
 
89
90
  - [Treeshaking](https://webpack.js.org/guides/tree-shaking/)
90
91
  - Rewriting some time critical parts in Rust 🚀🦀
91
- - Cross platform compatibility
92
- - Plugin and loader system
92
+ - Cross platform compatibility (multiple output bundles)
93
+ - Bundle python version shebang and bytecode compilation
94
+ - Plugin and loader system (like rollup and webpack)
93
95
 
94
96
  # Contributions
95
97
 
@@ -0,0 +1,11 @@
1
+ effectual/__init__.py,sha256=Hg_RSVgpLZvaeBUqt5uL_r5YIDsVdKPcFE2L5WJVYbM,482
2
+ effectual/build.py,sha256=Gpe8eD4ANq0t-b0j8D00zJFmjQbXxMWknlmwAzoJRf8,6338
3
+ effectual/colors.py,sha256=na7SEUSXM7aHvEKeIAn5shrZJtrBYq_ZUp121GRO_PQ,1411
4
+ effectual/config.py,sha256=Z99V7AnJpSWuo-aEz10TDj5BAaT7tboGJUjggj-HQh4,1798
5
+ effectual/developer.py,sha256=KU4Lu_-dyAlBmflso0WfdMHhC3QcilDJgal8y--ewEU,2006
6
+ effectual/transformations.py,sha256=7GHgQWzin2J1W62yMReHXaYIChXc3f0rNJA-yY4LDEI,1313
7
+ effectual-0.7.7.dist-info/METADATA,sha256=FlbH086ElRKs9TuA1OqchNdCgXzDew5Aa2REjXpaIx0,3060
8
+ effectual-0.7.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
+ effectual-0.7.7.dist-info/entry_points.txt,sha256=1W7EjlLZkw_Wz8V1SgdzzDis-CRE5IINyg74upsB0zU,40
10
+ effectual-0.7.7.dist-info/licenses/LICENSE,sha256=RrVXS_K_FctToNx9BLuZm9vbcpTi3PHNzWMaz7QyVeg,1082
11
+ effectual-0.7.7.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.26.3
2
+ Generator: hatchling 1.27.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,11 +0,0 @@
1
- effectual/__init__.py,sha256=Hg_RSVgpLZvaeBUqt5uL_r5YIDsVdKPcFE2L5WJVYbM,482
2
- effectual/build.py,sha256=0X3sKF9irQ2uDx8XiT3QBeqNozatFGq--siF4mdQE-U,6231
3
- effectual/colors.py,sha256=na7SEUSXM7aHvEKeIAn5shrZJtrBYq_ZUp121GRO_PQ,1411
4
- effectual/config.py,sha256=Z99V7AnJpSWuo-aEz10TDj5BAaT7tboGJUjggj-HQh4,1798
5
- effectual/developer.py,sha256=mZ77VvPyGxcUZINAtw5qFxuejYB0-ExNHieAFvob8ps,1765
6
- effectual/transformations.py,sha256=7GHgQWzin2J1W62yMReHXaYIChXc3f0rNJA-yY4LDEI,1313
7
- effectual-0.7.5.dist-info/METADATA,sha256=ailJ5HunlEitsvDKrCkiaHrr_oRCnaCMsfDNYl-8Cfs,2918
8
- effectual-0.7.5.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
9
- effectual-0.7.5.dist-info/entry_points.txt,sha256=1W7EjlLZkw_Wz8V1SgdzzDis-CRE5IINyg74upsB0zU,40
10
- effectual-0.7.5.dist-info/licenses/LICENSE,sha256=RrVXS_K_FctToNx9BLuZm9vbcpTi3PHNzWMaz7QyVeg,1082
11
- effectual-0.7.5.dist-info/RECORD,,