bcpkgfox 0.16.5b3__tar.gz → 0.16.5b5__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bcpkgfox
3
- Version: 0.16.5b3
3
+ Version: 0.16.5b5
4
4
  Summary: Biblioteca BCFOX
5
5
  Home-page: https://github.com/robotsbcfox/PacotePythonBCFOX
6
6
  Author: Guilherme Neri
@@ -163,13 +163,16 @@ class cli:
163
163
  self.exec_gen.zip_file()
164
164
 
165
165
  # LOG - Verify imports
166
- if self.args.find_imports \
167
- or self.args.install_imports \
168
- or self.args.venv \
169
- or self.args.recreate_venv \
170
- or self.args.exe:
171
- if self.args.verify_imports:
166
+ if self.args.verify_imports:
167
+ if self.args.find_imports \
168
+ or self.args.install_imports \
169
+ or self.args.venv \
170
+ or self.args.recreate_venv \
171
+ or self.args.exe:
172
172
  self.find_imports.verify_imports()
173
+ else:
174
+ print(f"{self.visuals.bold}{self.visuals.RD} > Error: You need to use one function that installs imports before verifying them.{self.visuals.RESET}")
175
+ print("\033[J", end='', flush=True)
173
176
 
174
177
  self.clean_terminal()
175
178
 
@@ -275,6 +278,7 @@ class cli:
275
278
  self.error = 0
276
279
  self.descerror = ""
277
280
  self.visuals = self.cli.visuals
281
+ self.ultimate_error = None
278
282
 
279
283
  def preparations(self):
280
284
  self.current_dir = os.getcwd()
@@ -389,12 +393,25 @@ class cli:
389
393
  else:
390
394
  print("Error: 'dist' directory not found!")
391
395
 
392
- shutil.make_archive(new_path, 'zip', new_path)
393
- os.remove(new_path)
396
+ zip_path = shutil.make_archive(new_path, 'zip', new_path)
397
+
398
+ # Espera o sistema liberar o zip
399
+ wait = 0
400
+ while True:
401
+ try:
402
+ with open(zip_path, 'rb'):
403
+ break
404
+ except (PermissionError, OSError):
405
+ time.sleep(0.1)
406
+ wait += 1
407
+ if wait >= 600:
408
+ raise TimeoutError("Timeout while waiting for zip file to be accessible.")
409
+
410
+ shutil.rmtree(new_path)
394
411
  zip_log = True
395
412
 
396
413
  except Exception as e:
397
- print(e)
414
+ self.ultimate_error = e
398
415
 
399
416
  finally:
400
417
  animation.finish()
@@ -402,7 +419,8 @@ class cli:
402
419
  if zip_log:
403
420
  print(f"{self.visuals.bold}{self.visuals.GR} > Zip file created successfully {self.visuals.RESET}\n")
404
421
  else:
405
- print(f"{self.visuals.bold}{self.visuals.RD} > Error creating zip file {self.visuals.RESET}\n")
422
+ print(f"{self.visuals.bold}{self.visuals.RD} > Error creating zip file:\n")
423
+ print(f"{self.ultimate_error}{self.visuals.RESET}")
406
424
  sys.exit(1)
407
425
 
408
426
  def main(self):
@@ -729,12 +747,14 @@ class cli:
729
747
  if result.stdout:
730
748
  print(f"\033[0J{result.stdout.strip()}\033[0J")
731
749
 
732
- except subprocess.CalledProcessError as e:
750
+ except Exception as e:
751
+ print(e)
733
752
  self.erro_libs.append(lib)
753
+ continue
734
754
 
735
755
  process_finished = True
736
756
  log_animation.join()
737
- print(f" {self.visuals.bold}{self.visuals.GR} > All packges installed with sucessfully {self.visuals.RESET}\n\n")
757
+ print(f" {self.visuals.bold}{self.visuals.GR} > All packages installed successfully {self.visuals.RESET}\n\n")
738
758
 
739
759
  except Exception as e:
740
760
  process_finished = True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bcpkgfox
3
- Version: 0.16.5b3
3
+ Version: 0.16.5b5
4
4
  Summary: Biblioteca BCFOX
5
5
  Home-page: https://github.com/robotsbcfox/PacotePythonBCFOX
6
6
  Author: Guilherme Neri
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="bcpkgfox",
5
- version="0.16.5b3",
5
+ version="0.16.5b5",
6
6
  author="Guilherme Neri",
7
7
  author_email="guilherme.neri@bcfox.com.br",
8
8
  description="Biblioteca BCFOX",
File without changes
File without changes