I am trying to use pyproject.toml
(and specifically setuptools_scm) in an isolated environment. My minimal pyproject.toml
is:
[build-system]
requires = ["setuptools-scm"]
[tool.setuptools_scm]
write_to = "mypackage/version.py"
However, when trying to install my package in an isolated environment, I get:
$ pip3 install --no-index -e .
Obtaining file:///home/…/myproject
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [2 lines of output]
ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none)
ERROR: No matching distribution found for setuptools>=40.8.0
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
However, setuptools and setuptools_scm are already installed (setuptools 66.1.1, setuptools_scm 7.1.0). There is no legacy setup.py
.
How can I ensure my package can be installed without network access (supposing that all dependencies are already resolved)?