|
@@ -149,23 +149,6 @@ class ModuleCopier:
|
|
elif isinstance(loader, zipimport.zipimporter):
|
|
elif isinstance(loader, zipimport.zipimporter):
|
|
copy_zipmodule(loader, modname, target)
|
|
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):
|
|
def copy_modules(modnames, target, py_version, path=None, exclude=None):
|
|
"""Copy the specified importable modules to the target directory.
|
|
"""Copy the specified importable modules to the target directory.
|