bcpkgfox 0.16.36__py3-none-any.whl → 0.16.37__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.
Potentially problematic release.
This version of bcpkgfox might be problematic. Click here for more details.
- bcpkgfox/cli.py +22 -17
- {bcpkgfox-0.16.36.dist-info → bcpkgfox-0.16.37.dist-info}/METADATA +1 -1
- {bcpkgfox-0.16.36.dist-info → bcpkgfox-0.16.37.dist-info}/RECORD +6 -6
- {bcpkgfox-0.16.36.dist-info → bcpkgfox-0.16.37.dist-info}/WHEEL +0 -0
- {bcpkgfox-0.16.36.dist-info → bcpkgfox-0.16.37.dist-info}/entry_points.txt +0 -0
- {bcpkgfox-0.16.36.dist-info → bcpkgfox-0.16.37.dist-info}/top_level.txt +0 -0
bcpkgfox/cli.py
CHANGED
|
@@ -184,6 +184,10 @@ class cli:
|
|
|
184
184
|
print(f"{self.visuals.bold}{self.visuals.RD} > Error: You need to use one function that installs imports before verifying them{self.visuals.RESET}")
|
|
185
185
|
print("\033[J", end='', flush=True)
|
|
186
186
|
|
|
187
|
+
# Requirements
|
|
188
|
+
if self.args.requirements:
|
|
189
|
+
self.venv_manager.requirements()
|
|
190
|
+
|
|
187
191
|
self.clean_terminal()
|
|
188
192
|
|
|
189
193
|
def clean_terminal(self):
|
|
@@ -801,34 +805,35 @@ class cli:
|
|
|
801
805
|
|
|
802
806
|
def __call__(self, parser, namespace, values, option_string=None):
|
|
803
807
|
if values is None:
|
|
804
|
-
setattr(namespace, self.dest,
|
|
808
|
+
setattr(namespace, self.dest, 'requirements.txt')
|
|
805
809
|
else:
|
|
806
810
|
setattr(namespace, self.dest, values)
|
|
807
811
|
|
|
808
|
-
def
|
|
809
|
-
if isinstance(self.cli.args.requirements, bool):
|
|
810
|
-
if '.' in self.cli.args.requirements:
|
|
811
|
-
ext = self.cli.args.requirements.rsplit('.', 1)[1]
|
|
812
|
-
else:
|
|
813
|
-
ext = None
|
|
812
|
+
def requirements(self):
|
|
814
813
|
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
814
|
+
# Identifies endwish
|
|
815
|
+
if '.' in self.cli.args.requirements:
|
|
816
|
+
name = self.cli.args.requirements
|
|
817
|
+
else:
|
|
818
|
+
name = self.cli.args.requirements + '.txt'
|
|
818
819
|
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
820
|
+
# Attempt of recreate
|
|
821
|
+
try:
|
|
822
|
+
os.remove(os.path.join(self.current_dir, name))
|
|
823
|
+
except:
|
|
824
|
+
pass
|
|
823
825
|
|
|
824
|
-
|
|
826
|
+
# Creates a new one
|
|
827
|
+
subprocess.run(f"pip freeze > {name}", shell=True)
|
|
825
828
|
|
|
826
|
-
|
|
829
|
+
# Read
|
|
830
|
+
with open(f'{name}', 'r') as f:
|
|
827
831
|
lines = f.readlines()
|
|
828
832
|
|
|
833
|
+
# Re-write
|
|
829
834
|
imports = self.cli.find_import.main(return_=True)
|
|
830
835
|
imports_lower = {imp.lower() for imp in imports}
|
|
831
|
-
with open('
|
|
836
|
+
with open(f'{name}', 'w') as f:
|
|
832
837
|
for line in lines:
|
|
833
838
|
if line.lower() in imports_lower:
|
|
834
839
|
f.write(line)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
bcpkgfox/__init__.py,sha256=BCTiPEXhpV3lV3HSVW6iCWFVema6VsIuwCQrUcHk8QM,16416
|
|
2
2
|
bcpkgfox/clean.py,sha256=80pJDTGmKmPiq73uL1IWopuxqVJF_bj_RVv-njkpl-A,8946
|
|
3
|
-
bcpkgfox/cli.py,sha256=
|
|
3
|
+
bcpkgfox/cli.py,sha256=dM_cL0BimgKufnqoz1zM2LZ-B225kOAt-_fSqBRMkc4,32723
|
|
4
4
|
bcpkgfox/exec_file.py,sha256=fl_Do2SlF7JuXazpNTod-e_0WZUk355fbd7ustQvi40,3728
|
|
5
5
|
bcpkgfox/find_elements.py,sha256=oeB-73LqMLoKchozPXuxRkThBju9IgUKqbgU-2AAq0s,23027
|
|
6
6
|
bcpkgfox/get_driver.py,sha256=ohimk9E2hL6T35IXv0XX0uvWDGCUZvZDlPMnuRjV1R0,30490
|
|
7
7
|
bcpkgfox/invoke_api.py,sha256=UTksbSmg6yucWk-egH1gavYoViKvpUq-OAp5t308ZmY,5334
|
|
8
8
|
bcpkgfox/system.py,sha256=3lyOWx893T6KiAI-jDv7zAo3oKPf0Q5CLgZ8TeFd0Do,7901
|
|
9
|
-
bcpkgfox-0.16.
|
|
10
|
-
bcpkgfox-0.16.
|
|
11
|
-
bcpkgfox-0.16.
|
|
12
|
-
bcpkgfox-0.16.
|
|
13
|
-
bcpkgfox-0.16.
|
|
9
|
+
bcpkgfox-0.16.37.dist-info/METADATA,sha256=wYRvCAaL0m6kA5sWoAWRwjfymaOJhavGN33KqCBfhbA,1912
|
|
10
|
+
bcpkgfox-0.16.37.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
11
|
+
bcpkgfox-0.16.37.dist-info/entry_points.txt,sha256=qmaEg6K7Y0HOeaFo-G6lf44InGkeVI4I6hqobcY_nns,653
|
|
12
|
+
bcpkgfox-0.16.37.dist-info/top_level.txt,sha256=h01SqyYBEfS72vkRFOlEDZBUSu9pzU0bdX4m9hWNNmw,9
|
|
13
|
+
bcpkgfox-0.16.37.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|