Skip to content

Commit 6050bef

Browse files
DimitriPapadopoulosastanin
authored andcommitted
setuptools → flit
Also: - Write package version to `_version.py` instead of `version.py`. - Get rid of the `README` symlink, `README.md` is good enough nowadays. - I have deliberately removed from the sdist: hidden files, `HOWTOPUBLISH` and `benchmark`.
1 parent ce67587 commit 6050bef

4 files changed

Lines changed: 10 additions & 11 deletions

File tree

HOWTOPUBLISH

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ python -m pre_commit run -a # and then commit changes
33
tox -e py310-extra,py311-extra,py312-extra,py313-extra,py314-extra
44
# tag version release (vX.Y.Z)
55
python -m pip install build twine
6-
python -m build -s # this will update tabulate/version.py
6+
python -m build -s # this will update tabulate/_version.py
77
python -m pip install . # install tabulate in the current venv
88
python -m pip install -r benchmark/requirements.txt
99
python benchmark/benchmark.py # then update README
1010
# move tag to the last commit
11-
python -m build -s # update tabulate/version.py
11+
python -m build -s # update tabulate/_version.py
1212
python -m build -nswx .
1313
git push # wait for all CI builds to succeed
1414
git push --tags # if CI builds succeed

MANIFEST.in

Lines changed: 0 additions & 6 deletions
This file was deleted.

README

Lines changed: 0 additions & 1 deletion
This file was deleted.

pyproject.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
2-
requires = ["setuptools>=77.0.3", "setuptools_scm[toml]>=3.4.3"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["flit>=3.12", "flit_scm"]
3+
build-backend = "flit_scm:buildapi"
44

55
[project]
66
name = "tabulate"
@@ -32,7 +32,12 @@ widechars = ["wcwidth>=0.6.0"]
3232
[project.scripts]
3333
tabulate = "tabulate:_main"
3434

35+
[tool.flit.sdist]
36+
include = ["CHANGELOG", "test/", "tox.ini"]
37+
exclude = ["tabulate/_version.py"]
38+
3539
[tool.setuptools_scm]
40+
write_to = "tabulate/_version.py"
3641

3742
[dependency-groups]
3843
dev = [
@@ -45,6 +50,7 @@ dev = [
4550

4651
[tool.ruff]
4752
line-length = 99
53+
exclude = ["tabulate/_version.py"]
4854

4955
[tool.ruff.lint]
5056
extend-select = ["W", "ISC", "I", "C90"]

0 commit comments

Comments
 (0)