bcpkgfox 0.16.13__tar.gz → 0.16.15__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.13
3
+ Version: 0.16.15
4
4
  Summary: Biblioteca BCFOX
5
5
  Home-page: https://github.com/robotsbcfox/PacotePythonBCFOX
6
6
  Author: Guilherme Neri
@@ -389,17 +389,24 @@ class cli:
389
389
  target_name = name_dir[-1]
390
390
 
391
391
  dist_path = os.path.join(self.current_dir, "dist")
392
- new_path = os.path.join(self.current_dir, target_name)
392
+ temp_path = os.path.join(self.current_dir, f"{target_name}_temp")
393
+ inner_path = os.path.join(temp_path, target_name)
393
394
 
394
395
  if os.path.exists(dist_path):
395
- os.rename(dist_path, new_path)
396
- print(f"Renamed 'dist' to '{target_name}'")
396
+ if os.path.exists(temp_path):
397
+ shutil.rmtree(temp_path)
398
+ os.mkdir(temp_path)
399
+ shutil.move(dist_path, inner_path)
397
400
  else:
398
401
  print(f"{self.visuals.bold}{self.visuals.RD}Error: 'dist' directory not found!{self.visuals.RESET}")
399
402
  sys.exit(1)
400
403
 
401
- zip_path = shutil.make_archive(new_path, 'zip', new_path)
402
- shutil.make_archive(str(new_path), 'zip', root_dir=str(new_path.parent), base_dir=str(new_path.name))
404
+ zip_path = shutil.make_archive(
405
+ os.path.join(self.current_dir, target_name),
406
+ 'zip',
407
+ root_dir=temp_path,
408
+ base_dir=target_name
409
+ )
403
410
 
404
411
  # Espera o sistema liberar o zip
405
412
  wait = 0
@@ -413,7 +420,7 @@ class cli:
413
420
  if wait >= 600:
414
421
  raise TimeoutError("Timeout while waiting for zip file to be accessible.")
415
422
 
416
- shutil.rmtree(new_path)
423
+ shutil.rmtree(temp_path)
417
424
  zip_log = True
418
425
 
419
426
  except Exception as e:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bcpkgfox
3
- Version: 0.16.13
3
+ Version: 0.16.15
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.13",
5
+ version="0.16.15",
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