From a5bea8f8b081cbbcf60a5c0b5d8705771a2f1dd9 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Thu, 5 Jan 2017 20:35:59 -0800 Subject: [PATCH] makewheel/deploy-ng: Use inspect.getfile(cmath) instead of cmath.__file__ for get_python_ext_module_dir() --- direct/src/showutil/dist.py | 3 ++- makepanda/makewheel.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/direct/src/showutil/dist.py b/direct/src/showutil/dist.py index fad55b5880..a8b3bc446c 100644 --- a/direct/src/showutil/dist.py +++ b/direct/src/showutil/dist.py @@ -46,7 +46,8 @@ def find_packages(whlfile): def get_python_ext_module_dir(): import cmath - return os.path.dirname(cmath.__file__) + import inspect + return os.path.dirname(inspect.getfile(cmath)) class build(distutils.command.build.build): diff --git a/makepanda/makewheel.py b/makepanda/makewheel.py index d1e67b185e..42847b2102 100644 --- a/makepanda/makewheel.py +++ b/makepanda/makewheel.py @@ -82,7 +82,8 @@ def is_fat_file(path): def get_python_ext_module_dir(): import cmath - return os.path.dirname(cmath.__file__) + import inspect + return os.path.dirname(inspect.getfile(cmath)) if sys.platform in ('win32', 'cygwin'):