effectual 0.6.0__py3-none-any.whl → 0.7.0__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,7 +41,7 @@ def bundleFiles(
41
41
  ) as bundler:
42
42
  cachePath: Path = Path("./.effectual_cache/cachedPackages")
43
43
  if cachePath.exists():
44
- if os.listdir(cachePath):
44
+ if Path.iterdir(cachePath):
45
45
  totalSize: int = int(0)
46
46
  for cachedFile in cachePath.rglob("*"):
47
47
  if cachedFile.is_dir() and not any(cachedFile.iterdir()):
@@ -49,7 +49,8 @@ def bundleFiles(
49
49
  totalSize += cachedFile.stat().st_size
50
50
  stringCachedFile = str(cachedFile)
51
51
  if (
52
- cachedFile.suffix in (".pyc", ".pyd", ".exe", ".typed")
52
+ cachedFile.suffix
53
+ in (".pyc", ".pyd", "pyi", ".exe", ".typed", ".so")
53
54
  or "__pycache__" in stringCachedFile
54
55
  or ".dist-info" in stringCachedFile
55
56
  or ".lock" in stringCachedFile
effectual/developer.py CHANGED
@@ -4,7 +4,7 @@ import zipfile
4
4
  from pathlib import Path
5
5
  from typing import Any
6
6
 
7
- from watch_lite import getAllHashes
7
+ from watchfiles import run_process
8
8
 
9
9
  from .colors import completeColor, fileColor, tagColor
10
10
  from .config import loadConfig
@@ -22,6 +22,7 @@ def bundle(sourceDirectory: Path, outputFile: Path) -> None:
22
22
  for pyFile in sourceDirectory.rglob("*.py"):
23
23
  print(f"{tagColor('bundling')} || {pyFile.name} {fileColor(pyFile)}")
24
24
  bundler.write(pyFile, arcname=pyFile.name)
25
+
25
26
  endTime = time.perf_counter()
26
27
 
27
28
  print(completeColor(f"Completed in {endTime - startTime:.4f}s"))
@@ -37,23 +38,12 @@ def main() -> None:
37
38
 
38
39
  outputFile: Path = devBundlePath / outputFileName
39
40
 
40
- bundle(sourceDirectory, outputFile)
41
+ run_process(sourceDirectory, target=runCommand, args=(sourceDirectory, outputFile))
41
42
 
42
- runCommand = subprocess.Popen(["uv", "run", outputFile], shell=True)
43
-
44
- lastHashSet: set[str] = getAllHashes(str(sourceDirectory))
45
-
46
- while True:
47
- currentHashSet: set[str] = getAllHashes(str(sourceDirectory))
48
- if currentHashSet != lastHashSet:
49
- runCommand.kill()
50
- runCommand.wait()
51
- lastHashSet = currentHashSet
52
- print(f"{tagColor('reloaded')} || file change detected")
53
- bundle(sourceDirectory, outputFile)
54
- runCommand = subprocess.Popen(["uv", "run", outputFile], shell=True)
55
- else:
56
- time.sleep(0.1)
43
+
44
+ def runCommand(sourceDirectory: Path, outputFile: Path) -> None:
45
+ bundle(sourceDirectory, outputFile)
46
+ subprocess.Popen(["uv", "run", outputFile], shell=True)
57
47
 
58
48
 
59
49
  if __name__ == "__main__":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: effectual
3
- Version: 0.6.0
3
+ Version: 0.7.0
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>
@@ -18,7 +18,7 @@ Requires-Dist: python-minifier>=2.11.3
18
18
  Requires-Dist: rtoml>=0.11.0
19
19
  Requires-Dist: ruff>=0.8.0
20
20
  Requires-Dist: termcolor>=2.4.0
21
- Requires-Dist: watch-lite>=0.1.1
21
+ Requires-Dist: watchfiles>=0.24.0
22
22
  Description-Content-Type: text/markdown
23
23
 
24
24
  # effectual
@@ -0,0 +1,11 @@
1
+ effectual/__init__.py,sha256=Hg_RSVgpLZvaeBUqt5uL_r5YIDsVdKPcFE2L5WJVYbM,482
2
+ effectual/build.py,sha256=P5XqH4OxbKAxa46HSFC1T3KE6xQiB_NBl8yry-MW9uc,5936
3
+ effectual/colors.py,sha256=na7SEUSXM7aHvEKeIAn5shrZJtrBYq_ZUp121GRO_PQ,1411
4
+ effectual/config.py,sha256=Z99V7AnJpSWuo-aEz10TDj5BAaT7tboGJUjggj-HQh4,1798
5
+ effectual/developer.py,sha256=bFE-jQM7TtegRknXEmz1gd_P3ga--anOvmruxRJpprE,1614
6
+ effectual/transformations.py,sha256=7GHgQWzin2J1W62yMReHXaYIChXc3f0rNJA-yY4LDEI,1313
7
+ effectual-0.7.0.dist-info/METADATA,sha256=GvekOJlxB_-7dE2lOdR4sweyhLDActVIqAx9COJnWZI,2590
8
+ effectual-0.7.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
9
+ effectual-0.7.0.dist-info/entry_points.txt,sha256=1W7EjlLZkw_Wz8V1SgdzzDis-CRE5IINyg74upsB0zU,40
10
+ effectual-0.7.0.dist-info/licenses/LICENSE,sha256=RrVXS_K_FctToNx9BLuZm9vbcpTi3PHNzWMaz7QyVeg,1082
11
+ effectual-0.7.0.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- effectual/__init__.py,sha256=Hg_RSVgpLZvaeBUqt5uL_r5YIDsVdKPcFE2L5WJVYbM,482
2
- effectual/build.py,sha256=XzpbgcPgb3OKA0dlFfkKu7SRN8Ihj9lrHQ8uT-PWTk8,5895
3
- effectual/colors.py,sha256=na7SEUSXM7aHvEKeIAn5shrZJtrBYq_ZUp121GRO_PQ,1411
4
- effectual/config.py,sha256=Z99V7AnJpSWuo-aEz10TDj5BAaT7tboGJUjggj-HQh4,1798
5
- effectual/developer.py,sha256=ekwlqvrOlX574aTdW0_kobu5f1x2UBspnhFAVitsV1k,2019
6
- effectual/transformations.py,sha256=7GHgQWzin2J1W62yMReHXaYIChXc3f0rNJA-yY4LDEI,1313
7
- effectual-0.6.0.dist-info/METADATA,sha256=zsNMMpKCCl4ie9PyV9yXnMXzNHUyp_d44JygXvBc1F0,2589
8
- effectual-0.6.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
9
- effectual-0.6.0.dist-info/entry_points.txt,sha256=1W7EjlLZkw_Wz8V1SgdzzDis-CRE5IINyg74upsB0zU,40
10
- effectual-0.6.0.dist-info/licenses/LICENSE,sha256=RrVXS_K_FctToNx9BLuZm9vbcpTi3PHNzWMaz7QyVeg,1082
11
- effectual-0.6.0.dist-info/RECORD,,