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

download attempts to build instead of just downloading #4239

Closed
benhosmer opened this issue Jan 17, 2017 · 7 comments
Closed

download attempts to build instead of just downloading #4239

benhosmer opened this issue Jan 17, 2017 · 7 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@benhosmer
Copy link

benhosmer commented Jan 17, 2017

  • Pip version: 9.0.1
  • Python version: 2.7
  • Operating System: CentOS 7.3.1611

Description:

I'm attempting to use the download option to download a tar.gz from pypi of the GDAL package

What I've run:

.venv/bin/pip download GDAL==2.1.0 --verbose --no-cache-dir --no-dependencies -d ./

  Saved ./GDAL-2.1.0.tar.gz
  Running setup.py (path:/tmp/pip-build-Gk23rl/GDAL/setup.py) egg_info for package GDAL
    Running command python setup.py egg_info
    running egg_info
    creating pip-egg-info/GDAL.egg-info
    writing pip-egg-info/GDAL.egg-info/PKG-INFO
InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-T9q_eG/GDAL/

Pip appears to be running setup.py which isn't what I want. I need to build the GDAL package with some optional flags that point to other header files.

@RonnyPfannschmidt
Copy link
Contributor

That's a needed feature, setup.py is usually dynamic, egg info extracts metadata pip needs

@benhosmer
Copy link
Author

That's a needed feature, setup.py is usually dynamic, egg info extracts metadata pip needs

Do you mean a needed feature in that the capability should be added, or that it works as intended and I'm just using it wrong?

@pfmoore
Copy link
Member

pfmoore commented Jan 17, 2017

It's how pip works, because we have to execute setup.py to get the metadata. You're not using it wrongly.

One key reason it needs the metadata is to get dependency information. It's possible that it would be OK to skip getting the metadata if --no-dependencies is set, but pip doesn't do that at the moment.

@xavfernandez
Copy link
Member

pip download pkgA will download the pkgA and by default all of its dependencies.

If pkgA is provided as a sdist (i.e. .tag.gz or .zip file), it means that pip will have to execute setup.py to extract the dependencies.

If you don't need the dependencies, pip download pkgA --no-deps (or --no-dependencies) will only download pkgA and won't execute any code.

@pfmoore
Copy link
Member

pfmoore commented Jan 17, 2017

@xavfernandez But doesn't the issue description show --no-dependencies still executing setup.py? I'm inclined to think this is an error on pip's part (unless the metadata is needed for some other aspect of pip download's behaviour).

@xavfernandez
Copy link
Member

Hmm you're right, I read too quickly :-/

@xavfernandez xavfernandez reopened this Jan 18, 2017
@dstufft
Copy link
Member

dstufft commented Mar 31, 2017

Duplicate of #1884.

@dstufft dstufft closed this as completed Mar 31, 2017
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 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
Projects
None yet
Development

No branches or pull requests

5 participants