Переглянути джерело

deploy-ng: Remove Python version string from the filename of copied extension modules

Mitchell Stokes 9 роки тому
батько
коміт
74a7d4ee48
1 змінених файлів з 3 додано та 0 видалено
  1. 3 0
      direct/src/showutil/dist.py

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

@@ -57,6 +57,9 @@ class build(distutils.command.build.build):
                 if '.' in module:
                     basename = module.rsplit('.', 1)[0] + '.' + basename
 
+                # Remove python version string
+                basename = '.'.join([i for i in basename.split('.') if not i.startswith('cpython-')])
+
                 target_path = os.path.join(builddir, basename)
                 distutils.file_util.copy_file(source_path, target_path)