From b542e8c0ea2af1c39c3e8e9e041cb26e8da348e2 Mon Sep 17 00:00:00 2001 From: Darren Eberly Date: Mon, 2 Nov 2020 20:28:58 -0500 Subject: [PATCH 1/5] Updates to setuptools configuration to align with PEP 517 --- pyproject.toml | 3 ++ requirements.txt | 18 ---------- requirements_dev.txt | 9 ----- setup.cfg | 65 +++++++++++++++++++++++++++++++++ setup.py | 86 ++------------------------------------------ 5 files changed, 71 insertions(+), 110 deletions(-) create mode 100644 pyproject.toml delete mode 100644 requirements.txt delete mode 100644 requirements_dev.txt diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000..07de284aa5 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools", "wheel"] +build-backend = "setuptools.build_meta" \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index a96c74a2b0..0000000000 --- a/requirements.txt +++ /dev/null @@ -1,18 +0,0 @@ -numpy -Pillow -Pyglet>=1.5.4,<2 -pytiled-parser==0.9.4a3 -pytest -pymunk -matplotlib -wheel -twine -sphinx-sitemap -sphinx_rtd_theme -sphinx-copybutton -flake8 -zstandard -mypy -coverage -tox -pyyaml diff --git a/requirements_dev.txt b/requirements_dev.txt deleted file mode 100644 index a2b33b21d0..0000000000 --- a/requirements_dev.txt +++ /dev/null @@ -1,9 +0,0 @@ --e . -coverage -coveralls -mypy -flake8 -pytest -pytest-cov -pytest-mock -setuptools diff --git a/setup.cfg b/setup.cfg index bb9fe91600..25e8b35814 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,68 @@ +[metadata] +name = arcade +description = Arcade Game Development Library +long_description = file: README.rst +author = Paul Vincent Craven +author_email = paul.craven@simpson.edu +license = MIT +license-file = license.rst +url = https://arcade.academy +download_url = https://arcade.academy +project_urls = + Documentation = https://arcade.academy/ + Example Code = http://arcade.academy/examples/index.html + Issue Tracker = https://github.com/pvcraven/arcade/issues + Source = https://github.com/pvcraven/arcade + On-line Book = http://learn.arcade.academy/ +classifiers = + Development Status :: 5 - Production/Stable + Intended Audience :: Developers + License :: OSI Approved :: MIT License + Operating System :: OS Independent + Programming Language :: Python + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: Implementation :: CPython + Topic :: Software Development :: Libraries :: Python Modules + +[options] +packages = find: +include_package_data = True +python_requires = >=3.6 +install_requires = + pyglet + pillow + numpy + pymunk + pyyaml + pytiled-parser == 0.9.4a3 + dataclasses;python_version<'3.7' + +[options.packages.find] +include = + arcade + arcade.* + +[options.extras_require] +dev = + pytest + flake8 + mypy + coverage + coveralls + pytest-mock + pytest-cov + +build = + pep517 + +docs = + sphinx + sphinx-sitemap + sphinx_rtd_theme + sphinx-copybutton + [build_sphinx] source-dir = doc build-dir = doc/build diff --git a/setup.py b/setup.py index b50f297a3a..97ba60786f 100644 --- a/setup.py +++ b/setup.py @@ -1,85 +1,5 @@ #!/usr/bin/env python +from setuptools import setup -from os import path -import sys -from setuptools import setup, find_namespace_packages - -VERSION = 'default' -def execfile(filepath, globals=None, locals=None): - if globals is None: - globals = {} - globals.update({ - "__file__": filepath, - "__name__": "__main__", - }) - with open(filepath, 'rb') as file: - exec(compile(file.read(), filepath, 'exec'), globals, locals) - - -# execute the file -execfile("arcade/version.py", locals=locals()) - -RELEASE = VERSION - -if __name__ == "__main__": - - install_requires = [ - 'pyglet', - 'pillow', - 'numpy', - 'pytiled-parser==0.9.4a3', - 'pymunk', - 'pyyaml' - ] - if sys.version_info[0] == 3 and sys.version_info[1] == 6: - install_requires.append('dataclasses') - - if "--format=msi" in sys.argv or "bdist_msi" in sys.argv: - # hack the version name to a format msi doesn't have trouble with - VERSION = VERSION.replace("-alpha", "a") - VERSION = VERSION.replace("-beta", "b") - VERSION = VERSION.replace("-rc", "r") - - fname = path.join(path.dirname(path.abspath(__file__)), "README.rst") - with open(fname, "r") as f: - long_desc = f.read() - - setup( - name="arcade", - version=RELEASE, - description="Arcade Game Development Library", - long_description=long_desc, - author="Paul Vincent Craven", - author_email="paul.craven@simpson.edu", - license="MIT", - url="http://arcade.academy", - download_url="http://arcade.academy", - install_requires=install_requires, - packages=find_namespace_packages( - include=["arcade", "arcade.*"], - exclude=[], - ), - python_requires='>=3.6', - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: Implementation :: CPython", - "Topic :: Software Development :: Libraries :: Python Modules", - ], - # include_package_data: If set to True, this tells setuptools to automatically include - # any data files it finds inside your package directories that are specified by your MANIFEST.in file. - include_package_data=True, - project_urls={ - 'Documentation': 'https://arcade.academy/', - 'Example Code ': 'http://arcade.academy/examples/index.html', - 'Issue Tracker': 'https://github.com/pvcraven/arcade/issues', - 'Source': 'https://github.com/pvcraven/arcade', - 'On-line Book': 'http://learn.arcade.academy/', - }, -) +exec(open("arcade/version.py").read()) +setup(version=VERSION,) From bcd4dbe469ead2d0972f4f04de91ceca870c4dda Mon Sep 17 00:00:00 2001 From: Darren Eberly Date: Mon, 2 Nov 2020 20:30:21 -0500 Subject: [PATCH 2/5] chore(setup): remove trailing comma --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 97ba60786f..eb23ca4326 100644 --- a/setup.py +++ b/setup.py @@ -2,4 +2,4 @@ from setuptools import setup exec(open("arcade/version.py").read()) -setup(version=VERSION,) +setup(version=VERSION) From f5d6b048ab8084da313cacf2fb7a644b25b55966 Mon Sep 17 00:00:00 2001 From: Darren Eberly Date: Mon, 2 Nov 2020 20:44:22 -0500 Subject: [PATCH 3/5] Pin crucial package versions --- setup.cfg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.cfg b/setup.cfg index 25e8b35814..0a6584b413 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,10 +31,10 @@ packages = find: include_package_data = True python_requires = >=3.6 install_requires = - pyglet - pillow - numpy - pymunk + pyglet>=1.5.8,<2 + pillow == 8.0.1 + numpy == 1.19.4 + pymunk == 5.7.0 pyyaml pytiled-parser == 0.9.4a3 dataclasses;python_version<'3.7' From c82d868aada644dfccdf712032c147cc3452515e Mon Sep 17 00:00:00 2001 From: Darren Eberly Date: Tue, 3 Nov 2020 21:03:03 -0500 Subject: [PATCH 4/5] Update MANIFEST to include .typed files. --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index 21c64aee7f..f12c8bb4e7 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,6 +2,7 @@ # one-liner to get extensions in package: set([l.split(",")[0].split('.')[-1] for l in open('files.txt').readlines()]) recursive-exclude arcade *.pyc +recursive-include arcade *.typed recursive-include arcade/resources *.txt *.md *.url recursive-include arcade/resources *.mp3 *.wav *.ogg recursive-include arcade/resources *.png *.jpg *.gif From 7d7c87d687af13669f90f320f4243cb022b417fa Mon Sep 17 00:00:00 2001 From: Darren Eberly Date: Tue, 3 Nov 2020 21:24:42 -0500 Subject: [PATCH 5/5] Finalize package version pins. --- setup.cfg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.cfg b/setup.cfg index 0a6584b413..845f051592 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,10 +32,10 @@ include_package_data = True python_requires = >=3.6 install_requires = pyglet>=1.5.8,<2 - pillow == 8.0.1 - numpy == 1.19.4 - pymunk == 5.7.0 - pyyaml + pillow ~= 8.0 + numpy ~= 1.19 + pymunk ~= 5.7 + pyyaml ~= 5.3 pytiled-parser == 0.9.4a3 dataclasses;python_version<'3.7'