Przeglądaj źródła

Copy dist-info only from distribution wheels, not importable modules

Adrien Ferrand 6 lat temu
rodzic
commit
77c9857892
1 zmienionych plików z 0 dodań i 17 usunięć
  1. 0 17
      nsist/copymodules.py

+ 0 - 17
nsist/copymodules.py

@@ -149,23 +149,6 @@ class ModuleCopier:
         elif isinstance(loader, zipimport.zipimporter):
             copy_zipmodule(loader, modname, target)
 
-        copy_distribution(modname, target)
-
-def copy_distribution(modname, target):
-    """Copy the metadata directory of the specified module 
-    to the target directory if exists.
-    """
-    try:
-        distribution = pkg_resources.get_distribution(modname)
-    except pkg_resources.DistributionNotFound:
-        # The package metadata is not available. We skip the process.
-        return
-
-    egg_info_path = distribution._provider.egg_info
-    dest = os.path.join(target, os.path.basename(egg_info_path))
-    if os.path.exists(egg_info_path) and not os.path.exists(dest):
-        shutil.copytree(egg_info_path, dest)
-
 
 def copy_modules(modnames, target, py_version, path=None, exclude=None):
     """Copy the specified importable modules to the target directory.