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

This commit is contained in:
Mitchell Stokes 2016-12-18 15:02:49 -08:00
parent 2923af7d44
commit 74a7d4ee48

View File

@ -57,6 +57,9 @@ class build(distutils.command.build.build):
if '.' in module: if '.' in module:
basename = module.rsplit('.', 1)[0] + '.' + basename 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) target_path = os.path.join(builddir, basename)
distutils.file_util.copy_file(source_path, target_path) distutils.file_util.copy_file(source_path, target_path)