Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/tabulate/version.py

build
dist
.tox
Expand Down
2 changes: 0 additions & 2 deletions HOWTOPUBLISH
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ python -m pre_commit run -a # and then commit changes
tox -e py310-extra,py311-extra,py312-extra,py313-extra,py314-extra
# tag version release (vX.Y.Z)
python -m pip install build twine
python -m build -s # this will update tabulate/_version.py
python -m pip install . # install tabulate in the current venv
python -m pip install -r benchmark/requirements.txt
python benchmark/benchmark.py # then update README
# move tag to the last commit
python -m build -s # update tabulate/_version.py
python -m build -nswx .
git push # wait for all CI builds to succeed
git push --tags # if CI builds succeed
Expand Down
15 changes: 6 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["flit>=3.12", "flit_scm"]
requires = ["flit_core>=3.12", "flit_scm"]
build-backend = "flit_scm:buildapi"

[project]
Expand Down Expand Up @@ -32,13 +32,6 @@ widechars = ["wcwidth>=0.6.0"]
[project.scripts]
tabulate = "tabulate:_main"

[tool.flit.sdist]
include = ["CHANGELOG", "test/", "tox.ini"]
exclude = ["tabulate/_version.py"]

[tool.setuptools_scm]
write_to = "tabulate/_version.py"

[dependency-groups]
dev = [
"build>=1.4.0",
Expand All @@ -48,9 +41,13 @@ dev = [
"twine>=6.2.0",
]

[tool.setuptools_scm]

[tool.flit.sdist]
include = ["CHANGELOG", "test/", "tox.ini"]

[tool.ruff]
line-length = 99
exclude = ["tabulate/_version.py"]

[tool.ruff.lint]
extend-select = ["W", "ISC", "I", "C90"]
Expand Down
5 changes: 1 addition & 4 deletions tabulate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
try:
__version__ = _version("tabulate")
except _PackageNotFoundError:
try:
from .version import version as __version__ # noqa: F401
except ImportError:
__version__ = "unknown"
__version__ = "unknown"

from collections import namedtuple
from collections.abc import Iterable, Sized
Expand Down