build: Migrate from setup.py to pyproject.toml #222
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
docs: Remove specificity of commands pip3 and python3
Python 2 has been sunset since 2020 1, and localstripe never
supported it.
This commit updates documentation to use
python
andpip
instead ofpython3
andpip3
.Remove UTF-8 headers in Python files
The
# -*- coding: utf-8 -*-
headers are useful for Python 2, butaren't needed for Python 3 which is the only supported version. Let's
drop these headers.
build: Migrate from setup.py to pyproject.toml
Using
setup.py
is deprecated and the new recommanded way is to declarea
pyproject.toml
file (see PEP 517 2).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 3, and seems to be the
most lightweight solution.
For some period, the
setup.py
file will be kept (although almostempty), to allow old tools versions to keep working.
I have done the same migration for yamllint 7 months ago 4 and it
appeared to work well.
Footnotes
https://www.python.org/doc/sunset-python-2/ ↩
https://peps.python.org/pep-0517/ ↩
https://packaging.python.org/en/latest/tutorials/installing-packages/ ↩
https://github.com/adrienverge/yamllint/pull/566 ↩