Skip to content

Commit

Permalink
Merge pull request #31 from mkoeppe/pyproject_metadata
Browse files Browse the repository at this point in the history
pyproject.toml: Move metadata, setuptools config here from setup.cfg
  • Loading branch information
videlec authored Feb 18, 2024
2 parents 3fe5f62 + c3577d4 commit 5710798
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 48 deletions.
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://pypi.org/project/pplpy/>`_ and
can be installed with pip::

Expand Down
13 changes: 3 additions & 10 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions ppl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@
Remove the _mutable_immutable class.
"""

__version__ = "0.8.9"

from .linear_algebra import (
Variable, Variables_Set, Linear_Expression,
)
Expand Down
61 changes: 60 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]"}]
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"]
37 changes: 0 additions & 37 deletions setup.cfg

This file was deleted.

0 comments on commit 5710798

Please sign in to comment.