-
Notifications
You must be signed in to change notification settings - Fork 88
/
setup.py
71 lines (56 loc) · 1.76 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
"""Setup file for Inputs module."""
from __future__ import with_statement
import platform
import inputs
try:
from setuptools import setup
except ImportError:
SETUPTOOLS = False
from distutils.core import setup
else:
SETUPTOOLS = True
# Unit Tests require mock on Python 2
TESTS_REQUIRE = []
try:
# pylint: disable=unused-import
import unittest.mock
except ImportError:
TESTS_REQUIRE.append('mock')
TESTS_REQUIRE.append('pathlib2')
INSTALL_REQUIRES = []
MAC = True if platform.system() == 'Darwin' else False
if MAC:
INSTALL_REQUIRES.append('pyobjc-framework-Quartz')
INPUTS_CLASSIFIERS = [
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Topic :: Software Development :: Libraries",
"Topic :: Utilities",
"Topic :: System :: Hardware :: Hardware Drivers",
"Topic :: Software Development :: Embedded Systems",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS :: MacOS X",
]
with open("README.rst", "r") as fp:
INPUTS_LONG_DESCRIPTION = fp.read()
SHORT_DESC = 'Cross-platform Python support for keyboards, mice and gamepads.'
KWARGS = {
'name': 'inputs',
'description': SHORT_DESC,
'version': inputs.__version__,
'author': 'Zeth',
'author_email': '[email protected]',
'py_modules': ['inputs'],
'long_description': INPUTS_LONG_DESCRIPTION,
'license': "BSD",
'classifiers': INPUTS_CLASSIFIERS,
'url': 'https://github.com/zeth/inputs',
}
if SETUPTOOLS:
KWARGS['tests_require'] = TESTS_REQUIRE
KWARGS['test_suite'] = 'tests'
KWARGS['install_requires'] = INSTALL_REQUIRES
setup(**KWARGS)