-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
68 lines (64 loc) · 2.06 KB
/
setup.py
File metadata and controls
68 lines (64 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
""" from setup example: https://github.com/pypa/sampleproject/blob/master/setup.py
"""
import sys
from setuptools import setup, find_namespace_packages
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
# Get requirements
with open('requirements.txt') as f:
required_modules = f.read().splitlines()
mainscript = 'invaders/__main__.py'
OPTIONS = {
'argv_emulation': True,
'iconfile': 'invaders/invader.icns'
}
if sys.platform == 'darwin':
extra_options = dict(
setup_requires=['py2app'],
app=[mainscript],
# Cross-platform applications generally expect sys.argv to
# be used for opening files.
options={'py2app': OPTIONS},
)
elif sys.platform == 'win32':
extra_options = dict(
setup_requires=['py2exe'],
options = {'py2exe': {'bundle_files': 1, 'compressed': True}},
windows = [{'script': mainscript}],
)
# older code above the bracket: app=[mainscript],
else:
extra_options = dict(
# Normally unix-like platforms will use "setup.py install"
# and install the main script as such
entry_points={
'console_scripts': ['invaders=invaders.__main__:gui']
},
)
setup(
name='Invaders',
version='1.0',
url='http://github.com/ccbogel/Invaders',
author='Colin Curtain',
author_email='ccbogel@hotmail.com',
description='Invaders shoot em up game',
long_description=long_description,
classifiers=[
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Operating System :: OS Independent',
'Development Status :: 3 - Alpha'
],
keywords='shooting space game',
packages=find_namespace_packages(include=['invaders','invaders.*']),
python_requires='>=3.10',
install_requires=required_modules,
package_data={
},
zip_safe=False,
include_package_data=True,
**extra_options
)