-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Migrate from setup.py to pyproject.toml
Using `setup.py` is deprecated and the new recommanded way is to declare a `pyproject.toml` file (see PEP 517 [^1]). This commit proposes to use setuptools to achieve that, because setuptools is already used by localstripe, is standard and referenced by the official Python packaging documentation [^2], and seems to be the most lightweight solution. For some period, the `setup.py` file will be kept (although almost empty), to allow old tools versions to keep working. I have done the same migration for yamllint 7 months ago [^3] and it appeared to work well. [^1]: https://peps.python.org/pep-0517/ [^2]: https://packaging.python.org/en/latest/tutorials/installing-packages/ [^3]: adrienverge/yamllint#566
- Loading branch information
1 parent
0fcea88
commit 659f382
Showing
4 changed files
with
52 additions
and
23 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
[project] | ||
name = "localstripe" | ||
description = """ | ||
A fake but stateful Stripe server that you can run locally, for \ | ||
testing purposes.""" | ||
readme = {file = "README.rst", content-type = "text/x-rst"} | ||
requires-python = ">=3.8" | ||
license = {text = "GPL-3.0-or-later"} | ||
authors = [{name = "Adrien Vergé"}] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"Topic :: Software Development", | ||
"Topic :: Software Development :: Quality Assurance", | ||
"Topic :: Software Development :: Testing", | ||
] | ||
dependencies = [ | ||
"aiohttp >=2.3.2", | ||
"python-dateutil >=2.6.1", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"flake8", | ||
"flake8-import-order", | ||
] | ||
|
||
[project.scripts] | ||
localstripe = "localstripe.server:start" | ||
|
||
[project.urls] | ||
homepage = "https://github.com/adrienverge/localstripe" | ||
repository = "https://github.com/adrienverge/localstripe" | ||
documentation = "https://github.com/adrienverge/localstripe" | ||
|
||
[build-system] | ||
build-backend = "setuptools.build_meta" | ||
requires = ["setuptools >= 61"] | ||
|
||
[tool.setuptools] | ||
packages = ["localstripe"] | ||
|
||
[tool.setuptools.package-data] | ||
localstripe = ["localstripe-v3.js"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "localstripe.__version__"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters