8000 Datetime fix for MinGW. by 87 · Pull Request #214 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Datetime fix for MinGW. #214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
BUG: Find only platform-specific dlls in winsxs directory.
  • Loading branch information
87 committed Feb 21, 2012
commit f86b0fd1f02ddc05b2f6747e873f3a13334e6de6
6 changes: 5 additions & 1 deletion numpy/distutils/mingw32ccompiler.py
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ def find_python_dll():
# - in system32,
# - ortherwise (Sxs), I don't know how to get it.
lib_dirs = []
lib_dirs.append(sys.prefix)
lib_dirs.append(os.path.join(sys.prefix, 'lib'))
try:
lib_dirs.append(os.path.join(os.environ['SYSTEMROOT'], 'system32'))
Expand Down Expand Up @@ -302,13 +303,16 @@ def generate_def(dll, dfile):

def find_dll(dll_name):

arch = {'AMD64' : 'amd64',
'Intel' : 'x86'}[get_build_architecture()]

def _find_dll_in_winsxs(dll_name):
# Walk through the WinSxS directory to find the dll.
winsxs_path = os.path.join(os.environ['WINDIR'], 'winsxs')
if not os.path.exists(winsxs_path):
return None
for root, dirs, files in os.walk(winsxs_path):
if dll_name in files:
if dll_name in files and arch in root:
return os.path.join(root, dll_name)
return None

Expand Down
0