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

pip download --no-deps should not attempt to load metadata #11039

Closed
1 task done
SpecLad opened this issue Apr 16, 2022 · 1 comment
Closed
1 task done

pip download --no-deps should not attempt to load metadata #11039

SpecLad opened this issue Apr 16, 2022 · 1 comment
Labels
resolution: duplicate Duplicate of an existing issue/PR

Comments

@SpecLad
Copy link
Contributor

SpecLad commented Apr 16, 2022

What's the problem this feature will solve?

Consider this:

$ pip download --no-deps psycopg2 --no-binary psycopg2
Collecting psycopg2
  Using cached psycopg2-2.9.3.tar.gz (380 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [23 lines of output]
      running egg_info
      creating /tmp/pip-pip-egg-info-zff26g_c/psycopg2.egg-info
      writing /tmp/pip-pip-egg-info-zff26g_c/psycopg2.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-pip-egg-info-zff26g_c/psycopg2.egg-info/dependency_links.txt
      writing top-level names to /tmp/pip-pip-egg-info-zff26g_c/psycopg2.egg-info/top_level.txt
      writing manifest file '/tmp/pip-pip-egg-info-zff26g_c/psycopg2.egg-info/SOURCES.txt'

      Error: pg_config executable not found.

      [... snipped irrelevant details ...]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

The requested distribution was downloaded, but, since pip failed to read its metadata, the command was aborted and the distribution was not saved. This failure seems unnecessary. Since --no-deps was specified, pip shouldn't have needed to fetch the metadata in the first place.

Describe the solution you'd like

pip download --no-deps should not attempt to read distribution metadata.

Alternative Solutions

I don't know of any tool other than pip that downloads distributions by name. If there is one that doesn't have this problem, that would probably satisfy me.

Additional context

The current behavior can be reproduced with pip 22.0.4.

Code of Conduct

@SpecLad SpecLad added S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature labels Apr 16, 2022
@uranusjr
Copy link
Member

duplicate of #1884

@uranusjr uranusjr added resolution: duplicate Duplicate of an existing issue/PR and removed type: feature request Request for a new feature S: needs triage Issues/PRs that need to be triaged labels Apr 16, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: duplicate Duplicate of an existing issue/PR
Projects
None yet
Development

No branches or pull requests

2 participants