Skip to content

Commit 5710798

Browse files
authored
Merge pull request #31 from mkoeppe/pyproject_metadata
pyproject.toml: Move metadata, setuptools config here from setup.cfg
2 parents 3fe5f62 + c3577d4 commit 5710798

File tree

5 files changed

+68
-48
lines changed

5 files changed

+68
-48
lines changed

README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ The available objects and functions from the `ppl` Python module are:
4444
Installation
4545
------------
4646

47+
<<<<<<< HEAD
48+
=======
4749

50+
>>>>>>> upstream/master
4851
The project is available at `Python Package Index <https://pypi.org/project/pplpy/>`_ and
4952
can be installed with pip::
5053

docs/source/conf.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,9 @@
4343
# built documents.
4444
#
4545
# The short X.Y version.
46-
import configparser
47-
config = configparser.ConfigParser(allow_no_value=True)
48-
try:
49-
with open("../../setup.cfg", encoding='utf-8') as f:
50-
config.read_string(f.read())
51-
except TypeError:
52-
# NOTE: encoding is not a keyword in Python 2
53-
with open("../../setup.cfg") as f:
54-
config.read_string(f.read().decode('utf-8'))
55-
version = release = config['metadata']['version']
46+
from ppl import __version__ as release
47+
48+
version = release
5649

5750
# List of patterns, relative to source directory, that match files and
5851
# directories to ignore when looking for source files.

ppl/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@
127127
Remove the _mutable_immutable class.
128128
"""
129129

130+
__version__ = "0.8.9"
131+
130132
from .linear_algebra import (
131133
Variable, Variables_Set, Linear_Expression,
132134
)

pyproject.toml

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,62 @@
11
[build-system]
2-
requires = ["setuptools", "wheel", "Cython", "cysignals", "sphinx", "gmpy2>=2.1.0b1"]
2+
requires = [
3+
"setuptools>=61.2",
4+
"Cython",
5+
"cysignals",
6+
"gmpy2>=2.1.0b1",
7+
]
38
build-backend = "setuptools.build_meta"
9+
10+
[project]
11+
name = "pplpy"
12+
description = "Python PPL wrapper"
13+
readme = "README.rst"
14+
authors = [{name = "Vincent Delecroix", email = "vincent.delecroix@labri.fr"}]
15+
license = {text = "GPL v3"}
16+
classifiers = [
17+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
18+
"Programming Language :: C++",
19+
"Programming Language :: Python",
20+
"Development Status :: 5 - Production/Stable",
21+
"Operating System :: Unix",
22+
"Intended Audience :: Science/Research",
23+
"Programming Language :: Python :: 3.8",
24+
"Programming Language :: Python :: 3.9",
25+
"Programming Language :: Python :: 3.10",
26+
"Programming Language :: Python :: 3.11",
27+
"Programming Language :: Python :: 3.12",
28+
]
29+
keywords = [
30+
"polyhedron",
31+
"polytope",
32+
"convex",
33+
"mathematics",
34+
"ppl",
35+
"milp",
36+
"linear-programming",
37+
]
38+
dependencies = [
39+
"cysignals",
40+
"gmpy2>=2.1.0b1",
41+
]
42+
dynamic = ["version"]
43+
44+
[project.optional-dependencies]
45+
doc = [
46+
"sphinx",
47+
]
48+
49+
[project.urls]
50+
Homepage = "https://github.com/sagemath/pplpy"
51+
Download = "https://pypi.org/project/pplpy/#files"
52+
53+
[tool.setuptools]
54+
packages = ["ppl"]
55+
platforms = ["any"]
56+
include-package-data = false
57+
58+
[tool.setuptools.dynamic]
59+
version = {attr = "ppl.__version__"}
60+
61+
[tool.setuptools.package-data]
62+
ppl = ["*.pxd", "*.h", "*.hh"]

setup.cfg

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)