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

Get all build dependencies recusively? #2025

Open
HiPhish opened this issue Nov 23, 2023 · 0 comments
Open

Get all build dependencies recusively? #2025

HiPhish opened this issue Nov 23, 2023 · 0 comments

Comments

@HiPhish
Copy link

HiPhish commented Nov 23, 2023

What's the problem this feature will solve?

Hello. I want to be able to build all packages locally from source. To this end I need to download all runtime- and build time dependencies recursively. I thought that pip-tools would be able to compile a complete list of all dependencies, or at least several lists which complement each other.

Describe the solution you'd like

Here is a minimal example pyproject.toml:

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

[project]
requires-python = ">=3.9"
name = "foobar"
version = '0.0.1'
dependencies = ['django', 'twisted']

It depends on Django and Twisted. Twisted depends on Constantly, which depends on Versioneer at build time (versioneer[toml]==0.29 in build-system.requires). My understanding is that the following command should give me all build dependencies:

pip-compile --only-build-deps --all-build-deps pyproject.toml 

However, the output is missing Versioneer:

#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
#    pip-compile --all-build-deps --only-build-deps pyproject.toml
#
packaging==23.2
    # via setuptools-scm
setuptools-scm==8.0.4
    # via foobar (pyproject.toml::build-system.requires)
typing-extensions==4.8.0
    # via setuptools-scm
wheel==0.41.3
    # via
    #   foobar (pyproject.toml::build-system.backend::editable)
    #   foobar (pyproject.toml::build-system.backend::wheel)

# The following packages are considered to be unsafe in a requirements file:
# setuptools

Maybe I am misunderstanding the purpose of --all-build-deps, or maybe there is something off with constantly?

Alternative Solutions

The only alternative I can think of is manually downloading all runtime- and build time dependencies, opening the tarballs, looking for a pyproject.toml in each one, looking for a build-system.requires entry and downloading those, then repeating the process until no new packages get downloaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant