Explorar el Código

Merge pull request #161 from adferrand/include-dist-info

Copy package metadata from wheels and from modules
Thomas Kluyver hace 6 años
padre
commit
973a8afcd1
Se han modificado 2 ficheros con 2 adiciones y 1 borrados
  1. 1 1
      nsist/pypi.py
  2. 1 0
      nsist/tests/test_pypi.py

+ 1 - 1
nsist/pypi.py

@@ -228,7 +228,7 @@ def extract_wheel(whl_file, target_dir, exclude=None):
     target = Path(target_dir)
     copied_something = False
     for p in td.iterdir():
-        if p.suffix not in {'.data', '.dist-info'}:
+        if p.suffix not in {'.data'}:
             if p.is_dir():
                 # If the dst directory already exists, this will combine them.
                 # shutil.copytree will not combine them.

+ 1 - 0
nsist/tests/test_pypi.py

@@ -16,6 +16,7 @@ def test_download():
     with TemporaryDirectory() as td:
         extract_wheel(wheel, target_dir=td)
         assert_isfile(pjoin(td, 'astsearch.py'))
+        assert_isfile(pjoin(td, 'astsearch-0.1.2.dist-info', 'METADATA'))
 
 def test_bad_name():
     # Packages can't be named after stdlib modules like os