Skip to content

Commit 91dd7f1

Browse files
authored
Update setuptools configuration to align with PEP 517/518 (#780)
* Updates to setuptools configuration to align with PEP 517 * chore(setup): remove trailing comma * Pin crucial package versions * Update MANIFEST to include .typed files. * Finalize package version pins.
1 parent 3051413 commit 91dd7f1

File tree

6 files changed

+72
-110
lines changed

6 files changed

+72
-110
lines changed

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# one-liner to get extensions in package: set([l.split(",")[0].split('.')[-1] for l in open('files.txt').readlines()])
33

44
recursive-exclude arcade *.pyc
5+
recursive-include arcade *.typed
56
recursive-include arcade/resources *.txt *.md *.url
67
recursive-include arcade/resources *.mp3 *.wav *.ogg
78
recursive-include arcade/resources *.png *.jpg *.gif

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools", "wheel"]
3+
build-backend = "setuptools.build_meta"

requirements.txt

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

requirements_dev.txt

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

setup.cfg

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,68 @@
1+
[metadata]
2+
name = arcade
3+
description = Arcade Game Development Library
4+
long_description = file: README.rst
5+
author = Paul Vincent Craven
6+
author_email = paul.craven@simpson.edu
7+
license = MIT
8+
license-file = license.rst
9+
url = https://arcade.academy
10+
download_url = https://arcade.academy
11+
project_urls =
12+
Documentation = https://arcade.academy/
13+
Example Code = http://arcade.academy/examples/index.html
14+
Issue Tracker = https://github.com/pvcraven/arcade/issues
15+
Source = https://github.com/pvcraven/arcade
16+
On-line Book = http://learn.arcade.academy/
17+
classifiers =
18+
Development Status :: 5 - Production/Stable
19+
Intended Audience :: Developers
20+
License :: OSI Approved :: MIT License
21+
Operating System :: OS Independent
22+
Programming Language :: Python
23+
Programming Language :: Python :: 3.6
24+
Programming Language :: Python :: 3.7
25+
Programming Language :: Python :: 3.8
26+
Programming Language :: Python :: Implementation :: CPython
27+
Topic :: Software Development :: Libraries :: Python Modules
28+
29+
[options]
30+
packages = find:
31+
include_package_data = True
32+
python_requires = >=3.6
33+
install_requires =
34+
pyglet>=1.5.8,<2
35+
pillow ~= 8.0
36+
numpy ~= 1.19
37+
pymunk ~= 5.7
38+
pyyaml ~= 5.3
39+
pytiled-parser == 0.9.4a3
40+
dataclasses;python_version<'3.7'
41+
42+
[options.packages.find]
43+
include =
44+
arcade
45+
arcade.*
46+
47+
[options.extras_require]
48+
dev =
49+
pytest
50+
flake8
51+
mypy
52+
coverage
53+
coveralls
54+
pytest-mock
55+
pytest-cov
56+
57+
build =
58+
pep517
59+
60+
docs =
61+
sphinx
62+
sphinx-sitemap
63+
sphinx_rtd_theme
64+
sphinx-copybutton
65+
166
[build_sphinx]
267
source-dir = doc
368
build-dir = doc/build

setup.py

Lines changed: 3 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,5 @@
11
#!/usr/bin/env python
2+
from setuptools import setup
23

3-
from os import path
4-
import sys
5-
from setuptools import setup, find_namespace_packages
6-
7-
VERSION = 'default'
8-
def execfile(filepath, globals=None, locals=None):
9-
if globals is None:
10-
globals = {}
11-
globals.update({
12-
"__file__": filepath,
13-
"__name__": "__main__",
14-
})
15-
with open(filepath, 'rb') as file:
16-
exec(compile(file.read(), filepath, 'exec'), globals, locals)
17-
18-
19-
# execute the file
20-
execfile("arcade/version.py", locals=locals())
21-
22-
RELEASE = VERSION
23-
24-
if __name__ == "__main__":
25-
26-
install_requires = [
27-
'pyglet',
28-
'pillow',
29-
'numpy',
30-
'pytiled-parser==0.9.4a3',
31-
'pymunk',
32-
'pyyaml'
33-
]
34-
if sys.version_info[0] == 3 and sys.version_info[1] == 6:
35-
install_requires.append('dataclasses')
36-
37-
if "--format=msi" in sys.argv or "bdist_msi" in sys.argv:
38-
# hack the version name to a format msi doesn't have trouble with
39-
VERSION = VERSION.replace("-alpha", "a")
40-
VERSION = VERSION.replace("-beta", "b")
41-
VERSION = VERSION.replace("-rc", "r")
42-
43-
fname = path.join(path.dirname(path.abspath(__file__)), "README.rst")
44-
with open(fname, "r") as f:
45-
long_desc = f.read()
46-
47-
setup(
48-
name="arcade",
49-
version=RELEASE,
50-
description="Arcade Game Development Library",
51-
long_description=long_desc,
52-
author="Paul Vincent Craven",
53-
author_email="paul.craven@simpson.edu",
54-
license="MIT",
55-
url="http://arcade.academy",
56-
download_url="http://arcade.academy",
57-
install_requires=install_requires,
58-
packages=find_namespace_packages(
59-
include=["arcade", "arcade.*"],
60-
exclude=[],
61-
),
62-
python_requires='>=3.6',
63-
classifiers=[
64-
"Development Status :: 5 - Production/Stable",
65-
"Intended Audience :: Developers",
66-
"License :: OSI Approved :: MIT License",
67-
"Operating System :: OS Independent",
68-
"Programming Language :: Python",
69-
"Programming Language :: Python :: 3.6",
70-
"Programming Language :: Python :: 3.7",
71-
"Programming Language :: Python :: 3.8",
72-
"Programming Language :: Python :: Implementation :: CPython",
73-
"Topic :: Software Development :: Libraries :: Python Modules",
74-
],
75-
# include_package_data: If set to True, this tells setuptools to automatically include
76-
# any data files it finds inside your package directories that are specified by your MANIFEST.in file.
77-
include_package_data=True,
78-
project_urls={
79-
'Documentation': 'https://arcade.academy/',
80-
'Example Code ': 'http://arcade.academy/examples/index.html',
81-
'Issue Tracker': 'https://github.com/pvcraven/arcade/issues',
82-
'Source': 'https://github.com/pvcraven/arcade',
83-
'On-line Book': 'http://learn.arcade.academy/',
84-
},
85-
)
4+
exec(open("arcade/version.py").read())
5+
setup(version=VERSION)

0 commit comments

Comments
 (0)