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 dependencies declared in pyproject.toml using pip #11927

Closed
1 task done
MadEngineX opened this issue Apr 6, 2023 · 3 comments
Closed
1 task done

Download dependencies declared in pyproject.toml using pip #11927

MadEngineX opened this issue Apr 6, 2023 · 3 comments
Labels
resolution: duplicate Duplicate of an existing issue/PR type: feature request Request for a new feature

Comments

@MadEngineX
Copy link

What's the problem this feature will solve?

Description

I need to download wheel artifacts from my package registry. I've described pyproject.toml accirding to PEP-631:

[project]
name = "weather_service"
version = "0.1.1"
description = "A simple Python microservice to get random weather data."
authors = [
    {name = "Kazbek Tokaev", email = "ksxack@gmail.com"}
    ]
dependencies = [
    "weather-service==0.1.1"
]

[project.scripts]
weather-service = "weather_service.app:main"

[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

I use pip download pyproject.toml and I see, thar setuptools wheel-files installed, but dependencies ignored.

Btw, pip install works correctrly and resolve all dependencies.

Links

ref: https://stackoverflow.com/questions/62408719/download-dependencies-declared-in-pyproject-toml-using-pip?noredirect=1&lq=1

Describe the solution you'd like

I'd like to install dependencies described in pyproject.toml by using command: pip download pyproject.toml

Alternative Solutions

Additional context

Code of Conduct

@MadEngineX MadEngineX added S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature labels Apr 6, 2023
@pfmoore
Copy link
Member

pfmoore commented Apr 6, 2023

I use pip download pyproject.toml

That command will download the project called pyproject.toml along with its dependencies, from PyPI. That’s not what you want to do…

@pradyunsg
Copy link
Member

Closing as a duplicate of #8049.

@pradyunsg pradyunsg added resolution: duplicate Duplicate of an existing issue/PR and removed S: needs triage Issues/PRs that need to be triaged labels Apr 6, 2023
@MadEngineX
Copy link
Author

Closing as a duplicate of #8049.

If I understand well, I should use:

pip install toml && python -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["project"]["dependencies"]))' | pip download -r /dev/stdin  --dest=dest 

against:

pip download -r pyproject.toml

Am I right?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 7, 2023
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 type: feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

3 participants