Skip to content
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

BUG: Make extensions compilable with MinGW on Py2.7 #9319

Merged
merged 2 commits into from Jun 27, 2017

Conversation

charris
Copy link
Member

@charris charris commented Jun 27, 2017

Backport #9280.

The original changeset 1c8ecc7 to make extensions compilable with MinGW
used the base_prefix attribute unconditionally. However, this is not
available in versions before Python 3.3.

This changeset introduces a check for whether the attribute is available
so that the code will work without errors also on Python 2.7. However,
this may lead to surprising results when compiling in a virtualenv.

Hat tip to Diorcet Yann (@diorcety) for pointing out this problem.

rolk added 2 commits June 27, 2017 09:22
The original changeset 1c8ecc7 to make extensions compilable with MinGW
used the base_prefix attribute unconditionally. However, this is not
available in versions before Python 3.3.

This changeset introduces a check for whether the attribute is available
so that the code will work without errors also on Python 2.7. However,
this may lead to surprising results when compiling in a virtualenv.

Hat tip to Diorcet Yann (@diorcety) for pointing out this problem.
If we are using the virtualenv module in Python 2.7 (as opposed to venv
in Python 3.3+), then the location of the base distribution is stored in
the real_prefix attribute instead of the base_prefix attribute.

This changeset adds the content of this attribute to the search paths if
it exist (i.e. in practice, if we are running Python 2.7), so that the
runtime libraries do not have to be duplicated in the virtualenv
directory.
@charris charris added this to the 1.13.1 release milestone Jun 27, 2017
@charris charris merged commit fcfc444 into numpy:maintenance/1.13.x Jun 27, 2017
@charris charris deleted the backport-9280 branch June 29, 2017 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants