-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Use a realpath for the temporary build directory. #3079
Conversation
Let me provide more information and rationale for this change and tests. The last fix in version 6.* still didn't fix the problem.
These files should have been in
While debugging the build I also observed that the paths for these *.ini files were misconfigured early on during the requirements setup. This later resulted in messages during the installation that copied them into The build machines had This fix in pip allows numpy to build without any issues and correctly package the core lib. |
I forgot to add that it would be really great if this small patch could be released as part of pip-7.1.3 bug-fix release instead of waiting for 8.*. It seems to be critical for people who depend on numpy and scipy and have build systems with symlinks. Thanks! |
+1 for this fix. |
Can someone please merge this upstream? |
731545e
to
9e97761
Compare
@@ -312,7 +312,13 @@ def build_location(self, build_dir): | |||
# package is not available yet so we create a temp directory | |||
# Once run_egg_info will have run, we'll be able | |||
# to fix it via _correct_build_location | |||
self._temp_build_dir = tempfile.mkdtemp('-build', 'pip-') | |||
# | |||
# NOTE: Some systems have /tmp as a symlink which confuses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the above comment is already a note, it makes little sense to demarkate this paragraph specifically as one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want me to:
- remove the comment completely?
- remove the marker "NOTE: " only?
- merge the comment with the one above on line 314?
Let me know, I can do whatever is preferred here.
It's important to draw attention to the reason for realpath, though, to avoid future regressions. This bug resurfaced multiple times through pip history and we want to avoid that. :-)
I'm wondering why numpy shouldn't be fixing its custom build system getting confused by such a mundane feature as symlinks, but instead pip should be making allowances for it? |
@Ivoz That said, I still believe this needs to be fixed in pip for the following reasons:
I stumbled upon this issue when I was approached for help by a developer whose app used to work perfectly fine with the older build that used older version of pip and then suddenly exhibited strange breakage in scipy/numpy dependency. To make things more difficult to debug, the build was working perfectly fine on our developer workstations and failing only on automated build machines. It took a while to track down what really happened and the issue #707 provided the clue. I hope you'll agree with me and accept the patch. Thanks a lot for reviewing! I'll rebase from develop and address your code comment now. |
9e97761
to
42b64e4
Compare
Can we merge this fix for regression of #707 now? |
+1 for this |
f1fcf87
to
227e8c7
Compare
Accidentally closed this, reopening. Sorry! |
Hello! As part of an effort to ease the contribution process and adopt a more standard workflow pip has switched to doing development on the If you do nothing, this Pull Request will be automatically closed by @BrownTruck since it cannot be merged. If this pull request is still valid, please rebase it against If you choose to rebase/merge and resubmit this Pull Request, here is an example message that you can copy and paste:
|
Some systems have /tmp symlinked which confuses custom builds, such as numpy. This ensures that real path is passed and that such builds resolve their paths correctly during build and install. Added test for the change and also for the previous related fix: pypa#707 --- *This was migrated from pypa#3079 to reparent it to the ``master`` branch. Please see original pull request for any previous discussion.*
Re-parented from master and submitted a new pull request: #3701 |
Some systems have /tmp symlinked which confuses custom builds, such as numpy. This ensures that real path is passed and that such builds resolve their paths correctly during build and install. Added test for the change and also for the previous related fix: #707 --- *This was migrated from #3079 to reparent it to the ``master`` branch. Please see original pull request for any previous discussion.*
We are using a custom version that fixes the build of numpy until the upstream project releases our pull request: pypa/pip#3079 RB=563664 G=python-foundation-reviewers R=sholsapp A=sholsapp
Some systems have /tmp symlinked which confuses custom builds, such as
numpy. This ensures that real path is passed and that such builds
resolve their paths correctly during build and install.
Added test for the change and also for the previous related fix:
#707