Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
38d67434
Commit
38d67434
authored
Aug 16, 2016
by
J. Goutin
Committed by
GitHub
Aug 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch with numpy at execution time and not at import time
parent
4c2b0a2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
setuptools/msvc.py
setuptools/msvc.py
+18
-7
No files found.
setuptools/msvc.py
View file @
38d67434
...
...
@@ -79,19 +79,17 @@ def patch_for_specialized_compiler():
pass
try
:
# Patch distutils._msvccompiler._get_vc_env
# Patch distutils._msvccompiler._get_vc_env
for numpy compatibility
unpatched
[
'msvc14_get_vc_env'
]
=
msvc14compiler
.
_get_vc_env
msvc14compiler
.
_get_vc_env
=
msvc14_get_vc_env
except
NameError
:
pass
try
:
# Apply "gen_lib_options" patch from Numpy to "distutils._msvccompiler"
# to fix compatibility between "numpy.distutils" and
# "distutils._msvccompiler" (for Numpy < 1.11.2)
import
numpy.distutils
as
np_distutils
msvc14compiler
.
gen_lib_options
=
np_distutils
.
ccompiler
.
gen_lib_options
except
(
ImportError
,
NameError
):
# Patch distutils._msvccompiler.gen_lib_options
unpatched
[
'msvc14_gen_lib_options'
]
=
msvc14compiler
.
gen_lib_options
msvc14compiler
.
gen_lib_options
=
msvc14_gen_lib_options
except
NameError
:
pass
...
...
@@ -221,6 +219,19 @@ def msvc14_get_vc_env(plat_spec):
raise
def
msvc14_gen_lib_options
(
*
args
,
**
kwargs
):
"""
Patched "distutils._msvccompiler.gen_lib_options" for fix
compatibility between "numpy.distutils" and "distutils._msvccompiler"
(for Numpy < 1.11.2)
"""
if
"numpy"
in
distutils
.
ccompiler
.
CCompiler
.
spawn
.
__module__
:
import
numpy
as
np
return
np
.
distutils
.
ccompiler
.
gen_lib_options
(
*
args
,
**
kwargs
)
else
:
return
unpatched
[
'msvc14_gen_lib_options'
](
*
args
,
**
kwargs
)
def
_augment_exception
(
exc
,
version
,
arch
=
''
):
"""
Add details to the exception message to help guide the user
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment