From 41556b07fc872216c645d8f882547ae12e021e86 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Thu, 5 Jan 2017 18:39:11 -0800 Subject: [PATCH] deploy-ng: Use a more generic method to remove version strings from extension module names This should help with stripping these strings on Windows. --- direct/src/showutil/dist.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/direct/src/showutil/dist.py b/direct/src/showutil/dist.py index 9ec399f805..88af7c2a54 100644 --- a/direct/src/showutil/dist.py +++ b/direct/src/showutil/dist.py @@ -123,7 +123,10 @@ class build(distutils.command.build.build): basename = module.rsplit('.', 1)[0] + '.' + basename # Remove python version string - basename = '.'.join([i for i in basename.split('.') if not i.startswith('cpython-')]) + if sys.version_info >= (3, 0): + parts = basename.split('.') + parts = parts[:-2] + parts[-1:] + basename = '.'.join(parts) target_path = os.path.join(builddir, basename) if '.whl/' in source_path: