diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7d6a967..fc64e42 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,7 +27,6 @@ jobs: cache: pip cache-dependency-path: | pyproject.toml - setup.py - name: Install test dependency run: pip install tox - name: Run tests diff --git a/docs/changelog.rst b/docs/changelog.rst index 7e62cc3..051d8e4 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,6 +1,11 @@ Changelog --------- +v0.16.1 +~~~~~~~ +* Switch from ``setup.py`` to ``pyproject.toml``. Only affects how installation + from source is performed, and has no runtime impact. + v0.16.0 ~~~~~~~ diff --git a/pyproject.toml b/pyproject.toml index 4f40731..a06c879 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,50 @@ [build-system] -requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"] +requires = ["setuptools>=61", "wheel", "setuptools_scm>=6.2"] +build-backend = "setuptools.build_meta" + +[project] +name = "python-barcode" +description = "Create standard barcodes with Python. No external modules needed. (optional Pillow support included)." +readme = "README.rst" +requires-python = ">=3.9" +license = { text = "MIT" } +authors = [ + { name = "Hugo Osvaldo Barrera et al", email = "hugo@whynothugo.nl" } +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Multimedia :: Graphics", + "Topic :: Software Development :: Libraries :: Python Modules", +] +dynamic = ["version"] + +[project.optional-dependencies] +images = ["pillow"] + +[project.scripts] +python-barcode = "barcode.pybarcode:main" + +[project.urls] +documentation = "https://python-barcode.readthedocs.io/" +repository = "https://github.com/WhyNotHugo/python-barcode" +issues = "https://github.com/WhyNotHugo/python-barcode/issues" +funding= "https://whynothugo.nl/sponsor/" + +[tool.setuptools] +include-package-data = true + +[tool.setuptools.packages.find] +exclude = ["tests"] [tool.setuptools_scm] write_to = "barcode/version.py" diff --git a/setup.py b/setup.py deleted file mode 100755 index 9b01447..0000000 --- a/setup.py +++ /dev/null @@ -1,39 +0,0 @@ -from __future__ import annotations - -from pathlib import Path - -from setuptools import find_packages -from setuptools import setup - -setup( - name="python-barcode", - packages=find_packages(exclude=["tests"]), - url="https://github.com/WhyNotHugo/python-barcode", - license="MIT", - author="Hugo Osvaldo Barrera et al", - author_email="hugo@whynothugo.nl", - description=( - "Create standard barcodes with Python. No external modules needed. " - "(optional Pillow support included)." - ), - long_description=Path("README.rst").read_text(), - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Topic :: Multimedia :: Graphics", - "Topic :: Software Development :: Libraries :: Python Modules", - ], - entry_points={"console_scripts": ["python-barcode = barcode.pybarcode:main"]}, - setup_requires=["setuptools_scm"], - extras_require={"images": ["pillow"]}, - include_package_data=True, -)