Skip to content

Commit 05fc27c

Browse files
committed
Switch from setup.py to pyproject.toml
The former is deprecated. Also fixes issues rendering README on PyPI.
1 parent f013b69 commit 05fc27c

File tree

4 files changed

+50
-41
lines changed

4 files changed

+50
-41
lines changed

.github/workflows/tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
cache: pip
2828
cache-dependency-path: |
2929
pyproject.toml
30-
setup.py
3130
- name: Install test dependency
3231
run: pip install tox
3332
- name: Run tests

docs/changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Changelog
22
---------
33

4+
v0.16.0
5+
~~~~~~~
6+
* Switch from ``setup.py`` to ``pyproject.toml``. Only affects how installation
7+
from source is performed, and has no runtime impact.
8+
49
v0.16.0
510
~~~~~~~
611

pyproject.toml

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,49 @@
11
[build-system]
2-
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"]
2+
requires = ["setuptools>=61", "wheel", "setuptools_scm>=6.2"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "python-barcode"
7+
description = "Create standard barcodes with Python. No external modules needed. (optional Pillow support included)."
8+
readme = "README.rst"
9+
requires-python = ">=3.9"
10+
license = { text = "MIT" }
11+
authors = [
12+
{ name = "Hugo Osvaldo Barrera et al", email = "[email protected]" }
13+
]
14+
urls = {
15+
documentation= "https://python-barcode.readthedocs.io/",
16+
repository = "https://github.com/WhyNotHugo/python-barcode",
17+
issues = "https://github.com/WhyNotHugo/python-barcode/issues",
18+
funding= "https://whynothugo.nl/sponsor/",
19+
}
20+
classifiers = [
21+
"Development Status :: 5 - Production/Stable",
22+
"Environment :: Console",
23+
"Intended Audience :: Developers",
24+
"License :: OSI Approved :: MIT License",
25+
"Operating System :: OS Independent",
26+
"Programming Language :: Python",
27+
"Programming Language :: Python :: 3",
28+
"Programming Language :: Python :: 3.9",
29+
"Programming Language :: Python :: 3.10",
30+
"Programming Language :: Python :: 3.11",
31+
"Programming Language :: Python :: 3.12",
32+
"Topic :: Multimedia :: Graphics",
33+
"Topic :: Software Development :: Libraries :: Python Modules",
34+
]
35+
36+
[project.optional-dependencies]
37+
images = ["pillow"]
38+
39+
[project.scripts]
40+
python-barcode = "barcode.pybarcode:main"
41+
42+
[tool.setuptools]
43+
include-package-data = true
44+
45+
[tool.setuptools.packages.find]
46+
exclude = ["tests"]
347

448
[tool.setuptools_scm]
549
write_to = "barcode/version.py"

setup.py

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

0 commit comments

Comments
 (0)