pyloid 0.20.0__tar.gz → 0.20.1__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyloid
3
- Version: 0.20.0
3
+ Version: 0.20.1
4
4
  Summary:
5
5
  Author: aesthetics-of-record
6
6
  Author-email: 111675679+aesthetics-of-record@users.noreply.github.com
@@ -86,7 +86,7 @@ This project uses PySide6, which is licensed under the LGPL (Lesser General Publ
86
86
 
87
87
  ## Contributing 🤝
88
88
 
89
- (Add information about how to contribute here)
89
+ Not Yet
90
90
 
91
91
  ## Issues
92
92
 
@@ -70,7 +70,7 @@ This project uses PySide6, which is licensed under the LGPL (Lesser General Publ
70
70
 
71
71
  ## Contributing 🤝
72
72
 
73
- (Add information about how to contribute here)
73
+ Not Yet
74
74
 
75
75
  ## Issues
76
76
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyloid"
3
- version = "0.20.0"
3
+ version = "0.20.1"
4
4
  description = ""
5
5
  authors = ["aesthetics-of-record <111675679+aesthetics-of-record@users.noreply.github.com>"]
6
6
  readme = "README.md"
@@ -25,22 +25,23 @@ def cleanup_before_build(json_path):
25
25
  if not dist_dir.exists():
26
26
  raise Exception(f"Cannot find directory to clean: {dist_dir}")
27
27
 
28
- if not cleanup_patterns:
29
- print("\033[1;33mNo cleanup patterns found. Files may have already been removed.\033[0m")
30
- else:
31
- print("\033[1;34mCleaning up unnecessary files...\033[0m")
32
- for pattern in cleanup_patterns:
33
- matching_files = list(dist_dir.glob(pattern))
34
- if not matching_files:
35
- print(f"\033[1;33mAleady removed: {pattern}\033[0m")
36
- for file_path in matching_files:
37
- print(f"\033[33mRemoving: {file_path}\033[0m")
38
- if file_path.is_dir():
39
- shutil.rmtree(file_path)
40
- else:
41
- file_path.unlink()
42
- print(f"\033[32mRemoved: {file_path}\033[0m")
43
-
28
+ print("\033[1;34mCleaning up unnecessary files...\033[0m")
29
+ exclude_patterns = [p[1:] for p in cleanup_patterns if p.startswith('!')]
30
+ include_patterns = [p for p in cleanup_patterns if not p.startswith('!')]
31
+
32
+ for pattern in include_patterns:
33
+ matching_files = list(dist_dir.glob(pattern))
34
+ for file_path in matching_files:
35
+ if any(file_path.match(p) for p in exclude_patterns):
36
+ print(f"\033[33mSkipping: {file_path}\033[0m")
37
+ continue
38
+ print(f"\033[33mRemoving: {file_path}\033[0m")
39
+ if file_path.is_dir():
40
+ shutil.rmtree(file_path)
41
+ else:
42
+ file_path.unlink()
43
+ print(f"\033[32mRemoved: {file_path}\033[0m")
44
+
44
45
  print("\033[1;32mFile cleanup completed.\033[0m")
45
46
 
46
47
  except Exception as e:
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