|
1 | 1 | #!/usr/bin/env python |
| 2 | +from setuptools import setup |
2 | 3 |
|
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