-
Notifications
You must be signed in to change notification settings - Fork 221
/
setup.py
executable file
·67 lines (61 loc) · 2.18 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
import sys
import pyminifier
from setuptools import setup
from distutils.command.install import INSTALL_SCHEMES
for scheme in INSTALL_SCHEMES.values():
scheme['data'] = scheme['purelib']
extra = {}
if isinstance(sys.version_info, tuple):
major = sys.version_info[0]
else:
major = sys.version_info.major
if major == 2:
from distutils.command.build_py import build_py
elif major == 3:
extra['use_2to3'] = True # Automatically convert to Python 3; love it!
try:
from distutils.command.build_py import build_py_2to3 as build_py
except ImportError:
print("Python 3.X support requires the 2to3 tool.")
print(
"It normally comes with Python 3.X but (apparenty) not on your "
"distribution.\nPlease find out what package you need to get 2to3"
"and install it.")
sys.exit(1)
cmdclass = {'build_py': build_py}
setup(
name="pyminifier",
version=pyminifier.__version__,
description="Python code minifier, obfuscator, and compressor",
author=pyminifier.__author__,
cmdclass=cmdclass,
author_email="daniel.mcdougall@liftoffsoftware.com",
url="https://github.com/liftoff/pyminifier",
license="Proprietary",
packages=['pyminifier'],
classifiers=[
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.1",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"License :: OSI Approved :: GNU Affero General Public License v3",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Libraries :: Python Modules",
],
provides=['pyminifier'],
entry_points = {
'console_scripts': [
'pyminifier = pyminifier.__main__:main'
],
},
test_suite = "tests",
**extra
)