From 514c7824c0092863e1a2a9dd6ee2f80d50d8275e Mon Sep 17 00:00:00 2001 From: KOLANICH Date: Thu, 16 Feb 2023 20:29:37 +0300 Subject: [PATCH 1/6] Convert license name into SPDX id in the metadata --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 4ae836d..b7de00f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,7 +3,7 @@ name = dlx version = 1.0.4 author = Sebastian Raaphorst author_email = srcoding@gmail.com -license = Apache 2.0 +license = Apache-2.0 license_files = LICENSE description = Implementation of Donald Knuth's Dancing Links algorithm. keywords = From 5d7c57d4b25edf1d36d55f9d4be1baca6b1ae695 Mon Sep 17 00:00:00 2001 From: KOLANICH Date: Thu, 16 Feb 2023 20:30:43 +0300 Subject: [PATCH 2/6] Add additional links to the metadata. --- setup.cfg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.cfg b/setup.cfg index b7de00f..431c3db 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,6 +14,9 @@ keywords = dancing links url = http://www.site.uottawa.ca/~mraap046 +project_urls = + Source Code = https://github.com/sraaphorst/dlx-python + Bug Tracker = https://github.com/sraaphorst/dlx-python/issues long_description = This package provides an implementation of Donald Knuth's Dancing Links algorithm for solving exact set cover problems. From de25ff98bfdf28e2f5cce27aef5907754462e6f0 Mon Sep 17 00:00:00 2001 From: KOLANICH Date: Thu, 16 Feb 2023 20:32:03 +0300 Subject: [PATCH 3/6] Add `build-system.build-backend` into `pyproject.toml`. --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 498d416..1cd983f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,5 @@ [build-system] requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"] +build-backend = "setuptools.build_meta" [tool.setuptools_scm] From 635e661718d10f7a45039c7e524eb73afd21cd0e Mon Sep 17 00:00:00 2001 From: KOLANICH Date: Thu, 16 Feb 2023 20:32:43 +0300 Subject: [PATCH 4/6] Remove redundant `wheel` from `pyproject.toml`. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1cd983f..a070c2c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"] +requires = ["setuptools>=42", "setuptools_scm[toml]>=3.4"] build-backend = "setuptools.build_meta" [tool.setuptools_scm] From 954bd9c5556a58fcf4a685df76ce4e903e2410c7 Mon Sep 17 00:00:00 2001 From: KOLANICH Date: Thu, 16 Feb 2023 20:34:31 +0300 Subject: [PATCH 5/6] Move the metadata from `setup.cfg` into `PEP 621`-compliant `pyproject.toml`. --- pyproject.toml | 47 ++++++++++++++++++++++++++++++++++++++++++++++- setup.cfg | 41 ----------------------------------------- 2 files changed, 46 insertions(+), 42 deletions(-) delete mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml index a070c2c..f950591 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,50 @@ [build-system] -requires = ["setuptools>=42", "setuptools_scm[toml]>=3.4"] +requires = ["setuptools>=61.2", "setuptools_scm[toml]>=3.4"] build-backend = "setuptools.build_meta" +[project] +name = "dlx" +authors = [{name = "Sebastian Raaphorst", email = "srcoding@gmail.com"}] +license = {text = "Apache-2.0"} +description = "Implementation of Donald Knuth's Dancing Links algorithm." +keywords = [ + "exact", + "cover", + "algorithm", + "dlx", + "dancing", + "links", +] +classifiers = [ + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Topic :: Scientific/Engineering :: Mathematics", +] +dynamic = ["version"] + +[project.urls] +Homepage = "http://www.site.uottawa.ca/~mraap046" +"Source Code" = "https://github.com/sraaphorst/dlx-python" +"Bug Tracker" = "https://github.com/sraaphorst/dlx-python/issues" + +[project.readme] +text = """ +This package provides an implementation of Donald Knuth's Dancing +Links algorithm for solving exact set cover problems. +1.0.4: Minor Python 3 bugfix. +1.0.3: Attempt to make code compatible with Python 3. +1.0.2: Removed extraneous code (had switched from callbacks for solutions to +making solve a generator to yield, but had forgotten to remove the +solution callback function parameter from the solve method). +1.0.1: Critical bugfix (N array was one short: did not account for header). +1.0.0: Initial release.""" +content-type = "text/plain" + +[tool.setuptools] +packages = ["dlx"] +license-files = ["LICENSE"] +include-package-data = false + [tool.setuptools_scm] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 431c3db..0000000 --- a/setup.cfg +++ /dev/null @@ -1,41 +0,0 @@ -[metadata] -name = dlx -version = 1.0.4 -author = Sebastian Raaphorst -author_email = srcoding@gmail.com -license = Apache-2.0 -license_files = LICENSE -description = Implementation of Donald Knuth's Dancing Links algorithm. -keywords = - exact - cover - algorithm - dlx - dancing - links -url = http://www.site.uottawa.ca/~mraap046 -project_urls = - Source Code = https://github.com/sraaphorst/dlx-python - Bug Tracker = https://github.com/sraaphorst/dlx-python/issues -long_description = - This package provides an implementation of Donald Knuth's Dancing - Links algorithm for solving exact set cover problems. - - 1.0.4: Minor Python 3 bugfix. - 1.0.3: Attempt to make code compatible with Python 3. - 1.0.2: Removed extraneous code (had switched from callbacks for solutions to - making solve a generator to yield, but had forgotten to remove the - solution callback function parameter from the solve method). - 1.0.1: Critical bugfix (N array was one short: did not account for header). - 1.0.0: Initial release. - -classifiers = - License :: OSI Approved :: Apache Software License - Programming Language :: Python - Development Status :: 4 - Beta - Intended Audience :: Developers - Topic :: Scientific/Engineering :: Mathematics - -[options] -packages = dlx -setup_requires = setuptools>=42;wheel;setuptools_scm[toml]>=3.4 From b91d8e092b89a4b7b30d91c86617f664c794f0ee Mon Sep 17 00:00:00 2001 From: KOLANICH Date: Thu, 16 Feb 2023 20:34:52 +0300 Subject: [PATCH 6/6] Remove redundant `setup.py` --- setup.py | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 setup.py diff --git a/setup.py b/setup.py deleted file mode 100644 index 5c7d318..0000000 --- a/setup.py +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python - -from setuptools import setup -if __name__ == "__main__": - setup() -