-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
80 lines (68 loc) · 2.38 KB
/
setup.py
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
69
70
71
72
73
74
75
76
77
78
79
80
#!/usr/bin/env python
import os
import shutil
import sys
from setuptools import setup, find_packages
# Bump pyglet/__init__.py version as well.
VERSION = '1.4.0b1'
long_description = '''pyglet provides an object-oriented programming
interface for developing games and other visually-rich applications
for Windows, Mac OS X and Linux.'''
# The source dist comes with batteries included, the wheel can use pip to get the rest
is_wheel = 'bdist_wheel' in sys.argv
excluded = []
if is_wheel:
excluded.append('extlibs.future')
def exclude_package(pkg):
for exclude in excluded:
if pkg.startswith(exclude):
return True
return False
def create_package_list(base_package):
return ([base_package] +
[base_package + '.' + pkg
for pkg
in find_packages(base_package)
if not exclude_package(pkg)])
setup_info = dict(
# Metadata
name='pyglet',
version=VERSION,
author='Alex Holkner',
author_email='[email protected]',
url='http://pyglet.readthedocs.org/en/latest/',
download_url='http://pypi.python.org/pypi/pyglet',
description='Cross-platform windowing and multimedia library',
long_description=long_description,
license='BSD',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: MacOS X',
'Environment :: Win32 (MS Windows)',
'Environment :: X11 Applications',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Games/Entertainment',
'Topic :: Software Development :: Libraries :: Python Modules',
],
# Package info
packages=create_package_list('pyglet'),
# Add _ prefix to the names of temporary build dirs
options={
'build': {'build_base': '_build'},
# 'sdist': {'dist_dir': '_dist'},
},
zip_safe=True,
)
if is_wheel:
setup_info['install_requires'] = ['future']
setup(**setup_info)