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

Try to build wheels for directories/VCS #4501

Closed
wants to merge 15 commits into from

Conversation

takluyver
Copy link
Member

Follow up from gh-4144

To allow build system abstractions, we want installation to go through wheels in more cases. In particular, installing packages from a local directory or a VCS URL currently runs 'setup.py install'. The aim of this PR is to have it build a wheel, which is stored in an ephemeral cache directory, used for installation, and then discarded.

We can't cache it permanently based on the path/URL, because the code there might change, but our cache wouldn't be invalidated.

Follow up from pypagh-4144

To allow build system abstractions, we want installation to go through
wheels in more cases. In particular, installing packages from a local
directory or a VCS URL currently runs 'setup.py install'. The aim of
this PR is to have it build a wheel, which is stored in an ephemeral
cache directory, used for installation, and then discarded.

We can't cache it permanently based on the path/URL, because the code
there might change, but our cache wouldn't be invalidated.
When there's a previous build directory, no_clean is set
@dstufft dstufft added this to the 10.0 milestone May 19, 2017
@takluyver
Copy link
Member Author

Well, that's weird. On Python 3.3, test_install_curdir_usersite finds a .dist-info folder. On Python 3.6, 3.5, 3.4 and 2.7, it finds .egg-info. 😕

@takluyver
Copy link
Member Author

The remaining test failure is because the tests timed out running on PyPy; I don't think that's related to this PR.

@ghost
Copy link

ghost commented May 20, 2017

@takluyver After pypa/setuptools#1037 is merged, you should be able to run setup.py egg_info --skip-fetch-build-eggs and then read the setup_requires in .egg-info/setup_requires.txt. This would allow pip to fulfill the installation of setup requirements via wheel and would satisfy the following:

This PEP covers step #2. It is fully expected that a future PEP will cover step #3, including how to have the build system dynamically specify more dependencies that the build system requires to perform its job.

@takluyver
Copy link
Member Author

Thanks @xoviat . The future PEP in question will hopefully be PEP 517, which is currently in draft. So that feature will be useful to implement a setuptools-based build backend.

@BrownTruck
Copy link
Contributor

Hello!

I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the master branch into this pull request or rebase this pull request against master then it will eligible for code review and hopefully merging!

@BrownTruck BrownTruck added the needs rebase or merge PR has conflicts with current master label Jun 13, 2017
@alex
Copy link
Member

alex commented Jun 22, 2017

My understanding is that this is one of the major blockers for pip 10; is there anything I could to help with it?

@pradyunsg
Copy link
Member

@alex The only thing I see being unresolved in this PR is the merge conflicts.

The functionality seems fine (took a passing look at it) and tests are passing (basically).

@alex
Copy link
Member

alex commented Jun 22, 2017

@pradyunsg Cool. I went ahead and submitted #4562 with the conflicts resolved.

@pradyunsg pradyunsg added the type: enhancement Improvements to functionality label Jun 26, 2017
@pradyunsg
Copy link
Member

@takluyver I'm closing this PR and removing it from the 10.0 milestone since #4562 supersedes this PR.

@nshgraph
Copy link

May I ask (naively) what the rationale is for making it build a wheel? We are after all specifying pip install

This just landed in pip 10 and broke our builds in quite a hard-to-debug way. I'm genuinely interested in knowing why the change was made so I can better understand the rationales behind pip and avoid such mistakes on my part in the future!

@Carreau
Copy link
Contributor

Carreau commented Apr 17, 2018 via email

@takluyver
Copy link
Member Author

Specifically, PEP 517 defined a standard interface for an install tool (like pip) to ask a build tool (like flit), "please make a wheel from this source tree for me". Unfortunately we didn't get support for that interface into pip 10, but the first step was that installing from source should always build a wheel and install that.

This also fits with @dstufft's goal of reducing the variety of pathways from source to installed code. If it's easy for developers to bypass building a distribution, it's easy for stuff to accidentally be left out of that distribution without the developers noticing there's a problem.

@lock
Copy link

lock bot commented Jun 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation needs rebase or merge PR has conflicts with current master type: enhancement Improvements to functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants