Skip to content

Commit 6e37802

Browse files
committed
Merge pull request astanin#179 from KOLANYCH-libs:pyproject.toml
Implements migration to PEP 621-compliant pyproject.toml. Merge conflicts were manually resolved (the list of the supported Python versions have changed since the time of the pull request).
2 parents 9172378 + 9d32480 commit 6e37802

File tree

7 files changed

+59
-66
lines changed

7 files changed

+59
-66
lines changed

.circleci/config.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@ jobs:
3939
- ./venv
4040
key: v1-dependencies-{{ checksum ".circleci/requirements.txt" }}
4141

42+
- run:
43+
name: build wheel
44+
command: |
45+
. venv/bin/activate
46+
python -m build -nwx .
47+
48+
- store_artifacts:
49+
path: dist
50+
destination: dist
51+
4252
- run:
4353
name: run tests
4454
command: |

.circleci/requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ tox
33
numpy
44
pandas
55
wcwidth
6+
setuptools
7+
pip
8+
build
9+
wheel
10+
setuptools_scm

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/tabulate/version.py
2+
13
build
24
dist
35
.tox

HOWTOPUBLISH

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# update contributors and CHANGELOG in README
2+
# tag version release
23
python3 benchmark.py # then update README
3-
tox -e py33,py34,py36-extra
4-
python3 setup.py sdist bdist_wheel
4+
tox -e py37-extra,py38-extra,py39-extra,py310-extra
5+
python3 -m build -nswx .
56
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
67
twine upload dist/*
7-
# tag version release
8-
# bump version number in setup.py in tabulate.py

pyproject.toml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[build-system]
2+
requires = ["setuptools>=61.2.0", "wheel", "setuptools_scm[toml]>=3.4.3"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "tabulate"
7+
authors = [{name = "Sergey Astanin", email = "s.astanin@gmail.com"}]
8+
license = {text = "MIT"}
9+
description = "Pretty-print tabular data"
10+
readme = "README.md"
11+
classifiers = [
12+
"Development Status :: 4 - Beta",
13+
"License :: OSI Approved :: MIT License",
14+
"Operating System :: OS Independent",
15+
"Programming Language :: Python :: 3",
16+
"Programming Language :: Python :: 3.7",
17+
"Programming Language :: Python :: 3.8",
18+
"Programming Language :: Python :: 3.9",
19+
"Programming Language :: Python :: 3.10",
20+
"Topic :: Software Development :: Libraries",
21+
]
22+
requires-python = ">=3.7"
23+
dynamic = ["version"]
24+
25+
[project.urls]
26+
Homepage = "https://github.com/astanin/python-tabulate"
27+
28+
[project.optional-dependencies]
29+
widechars = ["wcwidth"]
30+
31+
[project.scripts]
32+
tabulate = "tabulate:_main"
33+
34+
[tool.setuptools]
35+
packages = ["tabulate"]
36+
37+
[tool.setuptools_scm]
38+
write_to = "tabulate/version.py"

setup.py

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

tabulate.py renamed to tabulate/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def _is_file(f):
2222

2323

2424
__all__ = ["tabulate", "tabulate_formats", "simple_separated_format"]
25-
__version__ = "0.8.11"
25+
from .version import version as __version__ # noqa: F401
2626

2727

2828
# minimum extra space in headers

0 commit comments

Comments
 (0)