diff --git a/README.rst b/README.rst index e8ad7ea..397ec6e 100644 --- a/README.rst +++ b/README.rst @@ -44,7 +44,10 @@ The available objects and functions from the `ppl` Python module are: Installation ------------ +<<<<<<< HEAD +======= +>>>>>>> upstream/master The project is available at `Python Package Index `_ and can be installed with pip:: 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 8e1ed36..5a92e93 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,62 @@ [build-system] -requires = ["setuptools", "wheel", "Cython", "cysignals", "sphinx", "gmpy2>=2.1.0b1"] +requires = [ + "setuptools>=61.2", + "Cython", + "cysignals", + "gmpy2>=2.1.0b1", +] build-backend = "setuptools.build_meta" + +[project] +name = "pplpy" +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", + "Programming Language :: Python :: 3.12", +] +keywords = [ + "polyhedron", + "polytope", + "convex", + "mathematics", + "ppl", + "milp", + "linear-programming", +] +dependencies = [ + "cysignals", + "gmpy2>=2.1.0b1", +] +dynamic = ["version"] + +[project.optional-dependencies] +doc = [ + "sphinx", +] + +[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.dynamic] +version = {attr = "ppl.__version__"} + +[tool.setuptools.package-data] +ppl = ["*.pxd", "*.h", "*.hh"] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 10092be..0000000 --- a/setup.cfg +++ /dev/null @@ -1,37 +0,0 @@ -[metadata] -name = pplpy -version = 0.8.8 -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 - Programming Language :: Python :: 3.12 -keywords = - polyhedron - polytope - convex - mathematics - ppl - milp - linear-programming - -[options] -packages = ppl - -[options.package_data] -ppl = *.pxd, *.h, *.hh