Skip to content

Instantly share code, notes, and snippets.

@jsbueno
Created January 23, 2024 15:33
Show Gist options
  • Save jsbueno/0243a80b55412e58b384c722ac4b108f to your computer and use it in GitHub Desktop.
Save jsbueno/0243a80b55412e58b384c722ac4b108f to your computer and use it in GitHub Desktop.
Minimal pyproject.toml to use with setuptools and having a working, locally installable, package
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "mypackage"
version = "1.0"
[tool.setuptools]
packages = ["mypackage"]
@jsbueno
Copy link
Author

jsbueno commented Jan 23, 2024

with this file in place, one can use pip install -e . and just code the package.

@jsbueno
Copy link
Author

jsbueno commented Feb 14, 2024

UPDATE: the default values specified for pyproject.toml can do that (but your project version will be 0.0.0 instead)!
This means that for using setuptools, the minimal "pyproject.toml" can have 0 bytes instead (and no setup.py) - a pip install -e . will just work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment