Browse Source

deploy-ng: fix regression with builtin modules not being added

This happens only when the system Python has the module built-in (eg. on Ubuntu where most modules are builtin) but deploy-ng doesn't.

Regression was introduced by 94b5fa1e90c6746b587bcf1796a16b6df61886c1

Fixes #264
rdb 7 years ago
parent
commit
c8da53a81f
1 changed files with 3 additions and 2 deletions
  1. 3 2
      direct/src/showutil/dist.py

+ 3 - 2
direct/src/showutil/dist.py

@@ -350,8 +350,9 @@ class build_apps(distutils.core.Command):
                     continue
 
                 base = os.path.basename(i)
-                whl_modules.append(base)
-                whl_modules_ext = base.partition('.')[2]
+                module, _, ext = base.partition('.')
+                whl_modules.append(module)
+                whl_modules_ext = ext
 
         # Make sure to copy any builtins that have shared objects in the
         # deploy libs, assuming they are not already in freezer_extras.