Skip to content

Commit e277fc0

Browse files
claudephugovk
andauthored
Move more setup stuff to pyproject.toml (#542)
Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent 0857681 commit e277fc0

File tree

6 files changed

+66
-70
lines changed

6 files changed

+66
-70
lines changed

.github/workflows/docs-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
with:
2323
python-version: "3.10"
2424
cache: pip
25-
cache-dependency-path: "setup.py"
25+
cache-dependency-path: "pyproject.toml"
2626

2727
- name: Install dependencies
2828
run: |

.github/workflows/release.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,16 @@ jobs:
2424
with:
2525
python-version: "3.x"
2626
cache: pip
27-
cache-dependency-path: "setup.py"
27+
cache-dependency-path: "pyproject.toml"
2828

2929
- name: Install dependencies
3030
run: |
3131
python -m pip install -U pip
32-
python -m pip install -U setuptools twine wheel
32+
python -m pip install build twine
3333
3434
- name: Build package
3535
run: |
36-
python setup.py --version
37-
python setup.py sdist --format=gztar bdist_wheel
36+
python -m build
3837
twine check dist/*
3938
4039
- name: Upload packages to Jazzband

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424
cache: pip
25-
cache-dependency-path: "setup.py"
25+
cache-dependency-path: "pyproject.toml"
2626

2727
- name: Install dependencies
2828
run: |

pyproject.toml

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,64 @@
11
[build-system]
2-
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"]
2+
requires = ["setuptools>=58", "setuptools_scm[toml]>=6.2"]
33
build-backend = "setuptools.build_meta"
44

5+
[project]
6+
name = "tablib"
7+
description = "Format agnostic tabular data library (XLS, JSON, YAML, CSV, etc.)"
8+
readme = "README.md"
9+
license = {text = "MIT License"}
10+
authors = [
11+
{name = "Kenneth Reitz", email = "[email protected]"}
12+
]
13+
maintainers = [
14+
{name = "Jazzband Team", email = "[email protected]"},
15+
{name = "Hugo van Kemenade"},
16+
{name = "Claude Paroz", email = "[email protected]"},
17+
]
18+
requires-python = ">=3.7"
19+
classifiers = [
20+
"Development Status :: 5 - Production/Stable",
21+
"Intended Audience :: Developers",
22+
"Natural Language :: English",
23+
"License :: OSI Approved :: MIT License",
24+
"Programming Language :: Python",
25+
"Programming Language :: Python :: 3 :: Only",
26+
"Programming Language :: Python :: 3",
27+
"Programming Language :: Python :: 3.7",
28+
"Programming Language :: Python :: 3.8",
29+
"Programming Language :: Python :: 3.9",
30+
"Programming Language :: Python :: 3.10",
31+
"Programming Language :: Python :: 3.11",
32+
]
33+
dynamic = ["version"]
34+
35+
[project.optional-dependencies]
36+
all = [
37+
"markuppy",
38+
"odfpy",
39+
"openpyxl>=2.6.0",
40+
"pandas",
41+
"pyyaml",
42+
"tabulate",
43+
"xlrd",
44+
"xlwt",
45+
]
46+
cli = ["tabulate"]
47+
html = ["markuppy"]
48+
ods = ["odfpy"]
49+
pandas = ["pandas"]
50+
xls = ["xlrd", "xlwt"]
51+
xlsx = ["openpyxl>=2.6.0"]
52+
yaml = ["pyyaml"]
53+
54+
[project.urls]
55+
homepage = "https://tablib.readthedocs.io"
56+
documentation = "https://tablib.readthedocs.io"
57+
repository = "https://github.com/jazzband/tablib"
58+
changelog = "https://github.com/jazzband/tablib/blob/master/HISTORY.md"
59+
60+
[tool.setuptools_scm]
61+
write_to = "src/tablib/_version.py"
62+
563
[tool.isort]
664
profile = "black"

setup.py

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

tox.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ commands =
2424
[testenv:lint]
2525
deps =
2626
pre-commit
27+
build
2728
twine
2829
commands =
2930
pre-commit run --all-files
30-
python setup.py sdist
31+
python -m build
3132
twine check dist/*
3233
skip_install = true

0 commit comments

Comments
 (0)