Skip to content

Instantly share code, notes, and snippets.

@czerwe
Created May 31, 2023 09:00
Show Gist options
  • Save czerwe/0b238591fa0f8ecfa51db5d19b16525a to your computer and use it in GitHub Desktop.
Save czerwe/0b238591fa0f8ecfa51db5d19b16525a to your computer and use it in GitHub Desktop.
projecttoml replacement for setup.py
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "toolname"
version = "0.0.1000"
description = "description"
dependencies = [
"click",
"everett"
]
[project.scripts]
tridenttool = "toolname.cli:cli"
[tool.setuptools.packages.find]
where = ["src"]
[project.optional-dependencies]
test = ["coverage",
"pytest-cov",
"pytest-mock",
"requests-mock",
"pytest"]
[tool.setuptools.package-data]
"*" = ["templates/**", "__version__"]
[tool.mypy]
exclude = [
'^__version__$', # TOML literal string (single-quotes, no escaping necessary)
]
[tool.isort]
profile = "black"
@czerwe
Copy link
Author

czerwe commented May 31, 2023

Build with preparation with

pip3 install build

Build with:

python3 -m build . --wheel

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