From 40c23e5cf18de207a8226f5990e3bbd1327a96d4 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Fri, 6 Jan 2017 08:07:20 -0800 Subject: [PATCH] makewheel: Use _ctypes instead of cmath for get_python_ext_module_dir() Also switch back to using __file__ instead of inspect. --- makepanda/makewheel.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/makepanda/makewheel.py b/makepanda/makewheel.py index 42847b2102..af4dd30c90 100644 --- a/makepanda/makewheel.py +++ b/makepanda/makewheel.py @@ -81,9 +81,8 @@ def is_fat_file(path): def get_python_ext_module_dir(): - import cmath - import inspect - return os.path.dirname(inspect.getfile(cmath)) + import _ctypes + return os.path.dirname(_ctypes.__file__) if sys.platform in ('win32', 'cygwin'):