From 745f09b212bb17513c93821e1365e6af5fe65c14 Mon Sep 17 00:00:00 2001 From: boronine-bot Date: Tue, 20 Oct 2026 13:48:52 +0000 Subject: [PATCH 1/3] Replace setup.py with declarative pyproject.toml packaging --- .github/workflows/test.yml | 10 +++++++--- README.md | 3 +-- pyproject.toml | 38 ++++++++++++++++++++++++++++++++++++ setup.cfg | 2 -- setup.py | 40 -------------------------------------- 5 files changed, 46 insertions(+), 47 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 97ae8fc..f0d68b0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,10 +28,14 @@ jobs: - name: Run the Test Suite run: |- set -x - pip install -U setuptools # for Python >=3.12 - pip install pytest - python setup.py sdist + python -m pip install build pytest + python -m build cd dist/ tar xf hsluv-*.tar.gz cd hsluv-*/ + python -m pip install . pytest -v tests/ + cd .. + python -m pip install --force-reinstall hsluv-*.whl + python -c 'import hsluv; from importlib.metadata import version; assert hsluv.__version__ == version("hsluv")' + python -m unittest discover -s hsluv-*/tests -v diff --git a/README.md b/README.md index 96ac227..720b5bc 100644 --- a/README.md +++ b/README.md @@ -37,10 +37,9 @@ For HPLuv (the pastel variant), use `hpluv_to_hex`, `hpluv_to_rgb`, `hex_to_hplu ## Testing -Run `python setup.py test`. +Run `python -m unittest discover -v`. ## Authors * Robert McGinley ([mcginleyr1](https://github.com/mcginleyr1)) * Alexei Boronine ([boronine](https://github.com/boronine)) - diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..0a46900 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,38 @@ +[build-system] +requires = ["setuptools>=77.0.3"] +build-backend = "setuptools.build_meta" + +[project] +name = "hsluv" +dynamic = ["version"] +description = "Human-friendly HSL" +readme = "README.md" +license = "MIT" +license-files = ["LICENSE.txt"] +authors = [{email = "alexei@boronine.com"}] +requires-python = ">=3.11" +keywords = ["color", "hsl", "cie", "cieluv", "colorwheel", "hsluv", "hpluv"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Topic :: Software Development", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", + "Programming Language :: Python :: 3 :: Only", +] + +[project.urls] +Homepage = "https://www.hsluv.org" +"Bug Tracker" = "https://github.com/hsluv/hsluv-python/issues" +"Source Code" = "https://github.com/hsluv/hsluv-python" + +[tool.setuptools] +py-modules = ["hsluv"] + +[tool.setuptools.dynamic] +version = {attr = "hsluv.__version__"} diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 2a9acf1..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal = 1 diff --git a/setup.py b/setup.py deleted file mode 100644 index 9edb8d5..0000000 --- a/setup.py +++ /dev/null @@ -1,40 +0,0 @@ -#! /usr/bin/env python3 -from setuptools import setup - -from hsluv import __version__ - -setup( - name='hsluv', - version=__version__, - description='Human-friendly HSL', - long_description=open('README.md').read(), - long_description_content_type='text/markdown', - license="MIT", - author_email="alexei@boronine.com", - url="https://www.hsluv.org", - keywords="color hsl cie cieluv colorwheel hsluv hpluv", - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - "Topic :: Software Development", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.14", - "Programming Language :: Python :: 3.15", - "Programming Language :: Python :: 3 :: Only", - ], - python_requires='>=3.11', - setup_requires=[ - 'setuptools>=38.6.0', # for long_description_content_type - ], - py_modules=["hsluv"], - test_suite="tests.test_hsluv", - project_urls={ - "Bug Tracker": "https://github.com/hsluv/hsluv-python/issues", - "Source Code": "https://github.com/hsluv/hsluv-python", - } -) From fd955cd9569da3237c7c637e10a2750647366ae7 Mon Sep 17 00:00:00 2001 From: boronine-bot Date: Tue, 20 Oct 2026 14:00:01 +0000 Subject: [PATCH 2/3] Align package authors with README credits --- pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0a46900..5a808ae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,10 @@ description = "Human-friendly HSL" readme = "README.md" license = "MIT" license-files = ["LICENSE.txt"] -authors = [{email = "alexei@boronine.com"}] +authors = [ + {name = "Robert McGinley"}, + {name = "Alexei Boronine", email = "alexei@boronine.com"}, +] requires-python = ">=3.11" keywords = ["color", "hsl", "cie", "cieluv", "colorwheel", "hsluv", "hpluv"] classifiers = [ From b94199c558ab42c293d24b71675dcaac594f0f1e Mon Sep 17 00:00:00 2001 From: boronine-bot Date: Tue, 20 Oct 2026 14:09:29 +0000 Subject: [PATCH 3/3] Revert "Align package authors with README credits" This reverts commit fd955cd9569da3237c7c637e10a2750647366ae7. --- pyproject.toml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5a808ae..0a46900 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,10 +9,7 @@ description = "Human-friendly HSL" readme = "README.md" license = "MIT" license-files = ["LICENSE.txt"] -authors = [ - {name = "Robert McGinley"}, - {name = "Alexei Boronine", email = "alexei@boronine.com"}, -] +authors = [{email = "alexei@boronine.com"}] requires-python = ">=3.11" keywords = ["color", "hsl", "cie", "cieluv", "colorwheel", "hsluv", "hpluv"] classifiers = [