"requires" (pyproject.toml) with a local package in editable mode

Viewed 962

I am using a pyproject.toml file to allow me to use third party packages during my build. (For example, I'd like to use the toml package in setup.up.) When I add a local package to "requires" (installed in editable mode), the build doesn't see the package. Is there a way to include local packages in my pyproject.toml other than explicitly deploying them to pypi?

Here's what my pyproject.toml file looks like currently:

[build-system]
requires = ["setuptools", "wheel", "toml", "my_local_package"]
1 Answers

You can do something like:

[build-system]
build-backend = "setuptools.build_meta"
requires = [
  "setuptools >= 61.2",
  "versioningit @ file:///Users/basnijholt/Downloads/versioningit",
  "wheel",
]
Related