From 2218709b97a11ec87bacddae354aa682e483626b Mon Sep 17 00:00:00 2001 From: Vincent Delecroix Date: Sun, 3 Sep 2023 23:03:08 +0200 Subject: [PATCH 1/8] version bump to 0.8.9 --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 23c2dc8..c888f4d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = pplpy -version = 0.8.8 +version = 0.8.9 description = Python PPL wrapper long_description = file: README.rst author = Vincent Delecroix From 79d8f9844df219ff12a4bf44d97b1e1d093ae019 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 16 Feb 2024 14:45:24 -0800 Subject: [PATCH 2/8] pyproject.toml: Move metadata, setuptools config here from setup.cfg --- pyproject.toml | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- setup.cfg | 36 ------------------------------------ 2 files changed, 48 insertions(+), 37 deletions(-) delete mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml index 8e1ed36..55f5673 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,50 @@ [build-system] -requires = ["setuptools", "wheel", "Cython", "cysignals", "sphinx", "gmpy2>=2.1.0b1"] +requires = [ + "setuptools>=61.2", + "Cython", + "cysignals", + "sphinx", + "gmpy2>=2.1.0b1", +] build-backend = "setuptools.build_meta" + +[project] +name = "pplpy" +version = "0.8.8" +description = "Python PPL wrapper" +readme = "README.rst" +authors = [{name = "Vincent Delecroix", email = "vincent.delecroix@labri.fr"}] +license = {text = "GPL v3"} +classifiers = [ + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Programming Language :: C++", + "Programming Language :: Python", + "Development Status :: 5 - Production/Stable", + "Operating System :: Unix", + "Intended Audience :: Science/Research", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", +] +keywords = [ + "polyhedron", + "polytope", + "convex", + "mathematics", + "ppl", + "milp", + "linear-programming", +] + +[project.urls] +Homepage = "https://github.com/sagemath/pplpy" +Download = "https://pypi.org/project/pplpy/#files" + +[tool.setuptools] +packages = ["ppl"] +platforms = ["any"] +include-package-data = false + +[tool.setuptools.package-data] +ppl = ["*.pxd", "*.h", "*.hh"] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index c888f4d..0000000 --- a/setup.cfg +++ /dev/null @@ -1,36 +0,0 @@ -[metadata] -name = pplpy -version = 0.8.9 -description = Python PPL wrapper -long_description = file: README.rst -author = Vincent Delecroix -author_email = vincent.delecroix@labri.fr -url = https://github.com/sagemath/pplpy -download_url = https://pypi.org/project/pplpy/#files -license = GPL v3 -platforms = any -classifiers = - License :: OSI Approved :: GNU General Public License v3 (GPLv3) - Programming Language :: C++ - Programming Language :: Python - Development Status :: 5 - Production/Stable - Operating System :: Unix - Intended Audience :: Science/Research - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 -keywords = - polyhedron - polytope - convex - mathematics - ppl - milp - linear-programming - -[options] -packages = ppl - -[options.package_data] -ppl = *.pxd, *.h, *.hh From 9731a311d9b8fef91fc0a7dfa506bdcace1b5b47 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 16 Feb 2024 18:12:34 -0800 Subject: [PATCH 3/8] pyproject.toml: Declare cysignals, gmpy2 as runtime dependencies (formerly known as 'install-requires' --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 55f5673..9ca0c4f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,6 +36,11 @@ keywords = [ "milp", "linear-programming", ] +dependencies = [ + "cysignals", + "gmpy2>=2.1.0b1", +] + [project.urls] Homepage = "https://github.com/sagemath/pplpy" From ccb619d6638f59b40d88fc7b388f80a2b497b9d9 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 16 Feb 2024 18:14:17 -0800 Subject: [PATCH 4/8] pyproject.toml: Sphinx is not a build-system requirement; it is a optional dependency (formerly known as 'extras-require') --- pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9ca0c4f..939055b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,6 @@ requires = [ "setuptools>=61.2", "Cython", "cysignals", - "sphinx", "gmpy2>=2.1.0b1", ] build-backend = "setuptools.build_meta" @@ -41,6 +40,10 @@ dependencies = [ "gmpy2>=2.1.0b1", ] +[project.optional-dependencies] +doc = [ + "sphinx", +] [project.urls] Homepage = "https://github.com/sagemath/pplpy" From 071d4c87259ce1da0d8f1b2947620024a05bca43 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 16 Feb 2024 18:36:22 -0800 Subject: [PATCH 5/8] Single-source the version from ppl/__init__.py --- docs/source/conf.py | 13 +++---------- ppl/__init__.py | 2 ++ pyproject.toml | 5 ++++- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index f694f64..c5fa891 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -43,16 +43,9 @@ # built documents. # # The short X.Y version. -import configparser -config = configparser.ConfigParser(allow_no_value=True) -try: - with open("../../setup.cfg", encoding='utf-8') as f: - config.read_string(f.read()) -except TypeError: - # NOTE: encoding is not a keyword in Python 2 - with open("../../setup.cfg") as f: - config.read_string(f.read().decode('utf-8')) -version = release = config['metadata']['version'] +from ppl import __version__ as release + +version = release # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. diff --git a/ppl/__init__.py b/ppl/__init__.py index e983530..3452bfc 100644 --- a/ppl/__init__.py +++ b/ppl/__init__.py @@ -127,6 +127,8 @@ Remove the _mutable_immutable class. """ +__version__ = "0.8.9" + from .linear_algebra import ( Variable, Variables_Set, Linear_Expression, ) diff --git a/pyproject.toml b/pyproject.toml index 939055b..90e389b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,6 @@ build-backend = "setuptools.build_meta" [project] name = "pplpy" -version = "0.8.8" description = "Python PPL wrapper" readme = "README.rst" authors = [{name = "Vincent Delecroix", email = "vincent.delecroix@labri.fr"}] @@ -39,6 +38,7 @@ dependencies = [ "cysignals", "gmpy2>=2.1.0b1", ] +dynamic = ["version"] [project.optional-dependencies] doc = [ @@ -54,5 +54,8 @@ packages = ["ppl"] platforms = ["any"] include-package-data = false +[tool.setuptools.dynamic] +version = {attr = "ppl.__version__"} + [tool.setuptools.package-data] ppl = ["*.pxd", "*.h", "*.hh"] From 94e0677204c7cd3ceef8a9a11f1d0add33f34351 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 17 Feb 2024 00:09:07 -0800 Subject: [PATCH 6/8] README.rst: Update pypi links --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 8f9ff01..3f048c7 100644 --- a/README.rst +++ b/README.rst @@ -44,7 +44,7 @@ The available objects and functions from the `ppl` Python module are: Installation ------------ -The project is available at `Python Package Index `_ and +The project is available at `Python Package Index `_ and can be installed with pip:: $ pip install pplpy @@ -96,9 +96,9 @@ Requirements - `Cython `_ (tested with both 0.29 and 3.0) -- `cysignals `_ +- `cysignals `_ -- `gmpy2 `_ +- `gmpy2 `_ On Debian/Ubuntu systems the dependencies can be installed with:: From db172fba96a49a17eccffb9f29c441a05c17bdb9 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 17 Feb 2024 00:13:06 -0800 Subject: [PATCH 7/8] docs/source/index.rst: Update pypi links --- docs/source/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 2e4ad93..f55d874 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -6,7 +6,7 @@ Welcome to pplpy's documentation! Installation ------------ -pplpy is available from the `Python Package Index `_. You can hence install it with:: +pplpy is available from the `Python Package Index `_. You can hence install it with:: $ pip install pplpy From f4db39cec0cda9e4470f2574a56b2f28b27d8d8b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 17 Feb 2024 00:17:28 -0800 Subject: [PATCH 8/8] README.md: Update sphinx link --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 3f048c7..7ff4b5b 100644 --- a/README.rst +++ b/README.rst @@ -76,7 +76,7 @@ Documentation An online version of the documentation is available at https://www.sagemath.org/pplpy/ -Compiling the html documentation requires make and `sphinx `_. +Compiling the html documentation requires make and `sphinx `_. Before building the documentation, you need to install the pplpy package (sphinx uses Python introspection). The documentation source code is contained in the repository `docs` where there is a standard Makefile with a target `html`. Running `make html` in the `docs` repository builds the documentation