From cbb568f5cff0acd667bc3f057e6d8ae09b4c0aec Mon Sep 17 00:00:00 2001 From: bguise987 Date: Thu, 2 Apr 2026 15:30:57 -0400 Subject: [PATCH 1/3] Update how package gets version metadata --- pigz_python/__init__.py | 3 ++- setup.cfg | 2 +- setup.py | 34 ---------------------------------- 3 files changed, 3 insertions(+), 36 deletions(-) delete mode 100644 setup.py diff --git a/pigz_python/__init__.py b/pigz_python/__init__.py index 7c9882f..9a486e9 100644 --- a/pigz_python/__init__.py +++ b/pigz_python/__init__.py @@ -1,4 +1,5 @@ """ Metadata about the Pigz Python package """ -__version__ = "1.0.1" +from importlib.metadata import version +__version__ = version("pigz-python") from pigz_python.pigz_python import PigzFile, compress_file # noqa diff --git a/setup.cfg b/setup.cfg index b88034e..08aedd7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,2 @@ [metadata] -description-file = README.md +description_file = README.md diff --git a/setup.py b/setup.py deleted file mode 100644 index 78b0d71..0000000 --- a/setup.py +++ /dev/null @@ -1,34 +0,0 @@ -"""`pigz-python` lives on `GitHub `_.""" -from os import path - -from setuptools import find_packages, setup - -from pigz_python import __version__ - -this_directory = path.abspath(path.dirname(__file__)) -with open(path.join(this_directory, "README.md"), encoding="utf-8") as f: - long_description = f.read() - - -setup( - name="pigz-python", - version=__version__, - author="Ben Guise", - author_email="bguise135@gmail.com", - maintainer="Ben Guise", - maintainer_email="bguise135@gmail.com", - description="A pure Python implementation of the pigz utility.", - license="MIT", - keywords="zip gzip compression", - url="https://github.com/bguise987/pigz-python", - packages=find_packages(), - long_description=long_description, - long_description_content_type="text/markdown", - classifiers=[ - "Development Status :: 3 - Alpha", - "Intended Audience :: End Users/Desktop", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Topic :: Utilities", - ], -) From d05222ed49cf52c5bc0e9cdb5a4e0e72d3e153ff Mon Sep 17 00:00:00 2001 From: bguise987 Date: Thu, 2 Apr 2026 15:41:32 -0400 Subject: [PATCH 2/3] Add pyproject.toml --- pyproject.toml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..7856f7e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,37 @@ +[build-system] +requires = ["setuptools>=61"] +build-backend = "setuptools.build_meta" + +[project] +name = "pigz-python" +version = "2.0.0a0" +description = "A pure Python implementation of the pigz utility." +readme = "README.md" +license = "MIT" +requires-python = ">=3.9" +authors = [ + {name = "Ben Guise", email = "bguise135@gmail.com"}, +] +maintainers = [ + {name = "Ben Guise", email = "bguise135@gmail.com"}, +] +keywords = ["zip", "gzip", "compression"] +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: End Users/Desktop", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Topic :: Utilities", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", +] + +[project.urls] +Homepage = "https://github.com/bguise987/pigz-python" +Repository = "https://github.com/bguise987/pigz-python" + From 61b780111f1618a64db6d4dd819489a94f797a43 Mon Sep 17 00:00:00 2001 From: bguise987 Date: Thu, 2 Apr 2026 15:43:20 -0400 Subject: [PATCH 3/3] Black reformat __init__.py --- pigz_python/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pigz_python/__init__.py b/pigz_python/__init__.py index 9a486e9..52bb98a 100644 --- a/pigz_python/__init__.py +++ b/pigz_python/__init__.py @@ -1,5 +1,7 @@ -""" Metadata about the Pigz Python package """ +"""Metadata about the Pigz Python package""" + from importlib.metadata import version + __version__ = version("pigz-python") from pigz_python.pigz_python import PigzFile, compress_file # noqa