Skip to content

Commit 6e9b0ed

Browse files
committed
more migration to pyproject, fix for setuptools
1 parent b660dda commit 6e9b0ed

File tree

2 files changed

+47
-43
lines changed

2 files changed

+47
-43
lines changed

pyproject.toml

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,53 @@
11
[build-system]
2-
requires = ["setuptools", "wheel", "cffi >= 1.15.0"]
2+
requires = ["setuptools", "wheel", "cffi >= 1.17.1"]
33
build-backend = "setuptools.build_meta"
44

5+
[project]
6+
name = "pymunk"
7+
version = "6.8.1" # remember to change me for new versions!
8+
# Require cffi >1.14.0 since that (and older) has problem with returing structs from functions.
9+
# Require cffi >= 1.17.1 since older cant work with latest setuptools version
10+
dependencies = ["cffi >= 1.17.1"]
11+
authors = [{ name = "Victor Blomqvist", email = "vb@viblo.se" }]
12+
readme = "README.rst"
13+
description = "Pymunk is a easy-to-use pythonic 2D physics library"
14+
keywords = ["pygame", "2d", "physics", "rigid body"]
15+
classifiers = [
16+
"Development Status :: 5 - Production/Stable",
17+
"Intended Audience :: Developers",
18+
"License :: OSI Approved :: MIT License",
19+
"Operating System :: OS Independent",
20+
"Topic :: Games/Entertainment",
21+
"Topic :: Software Development :: Libraries",
22+
"Topic :: Software Development :: Libraries :: pygame",
23+
"Topic :: Scientific/Engineering :: Physics",
24+
"Programming Language :: Python",
25+
"Programming Language :: Python :: 3",
26+
]
27+
requires-python = ">=3.7"
28+
[project.optional-dependencies]
29+
dev = [
30+
"pyglet < 2.0.0",
31+
"pygame",
32+
"sphinx",
33+
"aafigure",
34+
"wheel",
35+
"matplotlib",
36+
"numpy",
37+
]
38+
[project.urls]
39+
Homepage = "https://www.pymunk.org"
40+
Documentation = "https://www.pymunk.org"
41+
Repository = "https://github.com/viblo/pymunk.git"
42+
Issues = "https://github.com/viblo/viblo/issues"
43+
Changelog = "https://github.com/viblo/pymunk/blob/master/CHANGELOG.rst"
44+
45+
[tool.setuptools.package-data]
46+
"pymunk.examples" = ["*.png", "*.wav"]
47+
48+
[tool.setuptools.exclude-package-data]
49+
50+
551
[tool.isort]
652
multi_line_output = 3
753
include_trailing_comma = true

setup.py

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,6 @@
22

33
from setuptools import setup # type: ignore
44

5-
classifiers = [
6-
"Development Status :: 5 - Production/Stable",
7-
"Intended Audience :: Developers",
8-
"License :: OSI Approved :: MIT License",
9-
"Operating System :: OS Independent",
10-
"Topic :: Games/Entertainment",
11-
"Topic :: Software Development :: Libraries",
12-
"Topic :: Software Development :: Libraries :: pygame",
13-
"Topic :: Scientific/Engineering :: Physics",
14-
"Programming Language :: Python",
15-
"Programming Language :: Python :: 3",
16-
]
17-
18-
with open("README.rst") as f:
19-
long_description = f.read()
20-
215
packages = ["pymunk", "pymunk.tests", "pymunk.examples"]
226
exclude_package_data = {}
237
if os.getenv("PYMUNK_BUILD_SLIM"):
@@ -26,33 +10,7 @@
2610

2711

2812
setup(
29-
name="pymunk",
30-
url="http://www.pymunk.org",
31-
author="Victor Blomqvist",
32-
author_email="vb@viblo.se",
33-
version="6.8.1", # remember to change me for new versions!
34-
description="Pymunk is a easy-to-use pythonic 2D physics library",
35-
long_description=long_description,
3613
packages=packages,
37-
# include_package_data=True,
38-
package_data={"pymunk.examples": ["*.png", "*.wav"]},
3914
exclude_package_data=exclude_package_data,
40-
license="MIT License",
41-
classifiers=classifiers,
42-
python_requires=">=3.7",
43-
# Require >1.14.0 since that (and older) has problem with returing structs from functions.
44-
install_requires=["cffi >= 1.15.0"],
4515
cffi_modules=["pymunk/pymunk_extension_build.py:ffibuilder"],
46-
extras_require={
47-
"dev": [
48-
"pyglet < 2.0.0",
49-
"pygame",
50-
"sphinx",
51-
"aafigure",
52-
"wheel",
53-
"matplotlib",
54-
"numpy",
55-
]
56-
},
57-
test_suite="pymunk.tests",
5816
)

0 commit comments

Comments
 (0)