Skip to content

Commit

Permalink
Move more setup stuff to pyproject.toml (#542)
Browse files Browse the repository at this point in the history
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
  • Loading branch information
claudep and hugovk authored Mar 5, 2023
1 parent 0857681 commit e277fc0
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 70 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
python-version: "3.10"
cache: pip
cache-dependency-path: "setup.py"
cache-dependency-path: "pyproject.toml"

- name: Install dependencies
run: |
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,16 @@ jobs:
with:
python-version: "3.x"
cache: pip
cache-dependency-path: "setup.py"
cache-dependency-path: "pyproject.toml"

- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U setuptools twine wheel
python -m pip install build twine
- name: Build package
run: |
python setup.py --version
python setup.py sdist --format=gztar bdist_wheel
python -m build
twine check dist/*
- name: Upload packages to Jazzband
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: "setup.py"
cache-dependency-path: "pyproject.toml"

- name: Install dependencies
run: |
Expand Down
60 changes: 59 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,64 @@
[build-system]
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"]
requires = ["setuptools>=58", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[project]
name = "tablib"
description = "Format agnostic tabular data library (XLS, JSON, YAML, CSV, etc.)"
readme = "README.md"
license = {text = "MIT License"}
authors = [
{name = "Kenneth Reitz", email = "me@kennethreitz.org"}
]
maintainers = [
{name = "Jazzband Team", email = "roadies@jazzband.co"},
{name = "Hugo van Kemenade"},
{name = "Claude Paroz", email = "claude@2xlibre.net"},
]
requires-python = ">=3.7"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dynamic = ["version"]

[project.optional-dependencies]
all = [
"markuppy",
"odfpy",
"openpyxl>=2.6.0",
"pandas",
"pyyaml",
"tabulate",
"xlrd",
"xlwt",
]
cli = ["tabulate"]
html = ["markuppy"]
ods = ["odfpy"]
pandas = ["pandas"]
xls = ["xlrd", "xlwt"]
xlsx = ["openpyxl>=2.6.0"]
yaml = ["pyyaml"]

[project.urls]
homepage = "https://tablib.readthedocs.io"
documentation = "https://tablib.readthedocs.io"
repository = "https://github.com/jazzband/tablib"
changelog = "https://github.com/jazzband/tablib/blob/master/HISTORY.md"

[tool.setuptools_scm]
write_to = "src/tablib/_version.py"

[tool.isort]
profile = "black"
62 changes: 0 additions & 62 deletions setup.py

This file was deleted.

3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ commands =
[testenv:lint]
deps =
pre-commit
build
twine
commands =
pre-commit run --all-files
python setup.py sdist
python -m build
twine check dist/*
skip_install = true

0 comments on commit e277fc0

Please sign in to comment.