-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
refactor --no-install/--no-download/--download (and use mkdtemp build dirs) #906
Comments
pip install --no-download isn't very useful or predictable compared to either
The flag requires a well-known build dir which doesn't seem terribly safe (symlink attacks?) and gives an opportunity for multiple processes by the same user to step on each other's toes. IMHO it would be better to deprecate this flag, and not make any new references to it or to the current "stuff accumulates in a static build dir" behaviour. Separating the other two flags into their own commands would be pretty good, I approve (and |
@g2p, I just updated the description regarding dropping --no-download. |
What is the work flow that is supported by |
in the description I mentioned "workflow" in reference to the existing as for and |
Well that's what I'm trying to explore, why should we have this feature. Primarily because I want to see if we should even have this, and if we should what the best form for this feature to exist as. As it is we're just kind of guessing and unless we identify an actual use case that we can decide on if we want to keep supporting that use case or not I think we should just remove it. Perhaps we should ping the pip mailing list and distutils-sig and see if anyone speaks up in support of this workflow? |
after the refactor, we'll have the following:
with these pieces, IF anyone was using the old --no-install / --no-download "workflow", then they can do it with these pieces, without us having to make a big decision on whether that workflow has merit or not. but yea, we can ask about the old workflow on the list, or also ask @ianb directly. it came from him I'm guessing. |
For what it's worth, I use
I'd actually argue for a I don't see any real need for |
just curious. what modifications?
if there is a substantial reason for people to be making local edits prior to install, then |
this should just fail immediately IMO, with "you can't download a local directory" |
Usually, it's been to set universal=True in setup.cfg to get universal wheels, things like that. Other things have been fiddling with custom script generation to try to use entry points (and hence pip's script support) instead, that's more the sort of thing I'd normally use a local clone for, but in at least one case (docutils) they use Subversion and frankly, life's too short to bother with svn :-) |
FWIW I use |
I could switch to unpacking the tar.gz/zip manually -- I obviously don't actually need the |
Just a heads up that CPython currently relies on If --no-install goes away entirely, we'll need to redesign those tests to do something else that would break the environment if the settings were being processed. |
I use the "pip install --no-install --download" command at the tail end of my build process to help gather the sdists for all dependencies and include them in my deployment artifact. This enables me to ensure that the code I'm deploying is the same as the code I've built and tested. download_dependencies ()
{
echo "*** download_requirements ***"
pip freeze | grep -vE "(wsm.|pygrametl|pyhive|pep8|pyflakes|pylint|nose|teamcity-|unittest2|coverage)" > build/dependencies.txt
pip install -i $INDEX_URL --no-install --use-mirrors --ignore-installed --download=build/$DIST_NAME/packages -r build/dependencies.txt
echo "*** download_requirements done. ***"
} Then at deployment time, I use the following commands to extract my deployment artifact, create the virtualenv, and ensure that only the included packages are installed: app_install_build()
{
if [ ! -d "$APP_BUILD" ]
then
echo "Installing $APP_BUILD"
# Un-pack the tgz
tar zxf "$APP_BUILD.tgz"
# Create the virtual environment
virtualenv -p "$APP_PYTHON" "$APP_BUILD"
source "$APP_BUILD/bin/activate"
# Install the packages
if [ -f "$APP_BUILD/requirements.txt" ]
then
# New style packaging using source distributions that is installable via pip
pip install --find-links="file://$APP_HOME/$APP_BUILD/packages/" --no-index -r "$APP_BUILD/requirements.txt"
... I'm looking at upgrading to a newer version of pip to pick up wheel support. How is this workflow handled by the new commands? |
@zroadhouse-wsm Everything still works for pip 1.5, which allows you to build (with the wheel package) and install wheels. This refactoring will be for 1.6 or later, in the future. |
@qwcode yeah, I can confirm the |
but when combined with |
in hindsight, I think it was a mistake to deprecate |
@derekstavis there's some fixes to |
I have worked out |
@qwcode I will try to build develop branch and test my scripts again to see if my problems got fixed. |
fyi, |
What is the status of this? I came to this because of:
and now I'm just confused. :-(
|
they're marked with |
I'm going to go ahead and remove this now. I think the only open thing is moving |
@msabramo pip install --download --no-install has been broken for ages - it was behaving identically to pip install --download. So you can just use pip install --download in all probability. |
This command in Python 3.4:
Gives me this message instead of downloading
Any ideas? |
|
FWIW, I was using |
Is there a way to emulate a |
pip install --download
->pip download
pip install --no-install
->pip unpack
pip install --no-download
-> get rid of it (see comments from @g2p below)along with this, move to mkdtemp build dirs (instead of static ones) in virtualenvs and global installs.
I think the --no-install/--no-download "workflow" is what fueled the static build dirs pip has, which have caused so many problems.
The text was updated successfully, but these errors were encountered: