-
Notifications
You must be signed in to change notification settings - Fork 38
/
setup.py
84 lines (67 loc) · 2.17 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
81
82
83
#!/usr/bin/env python
# -*- coding: utf-8 -
#
# This file is part of tproxy released under the MIT license.
# See the NOTICE for more information.
from __future__ import with_statement
from glob import glob
from imp import load_source
import os
import sys
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'Environment :: Other Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX',
'Programming Language :: Python',
'Topic :: Internet',
'Topic :: Internet',
'Topic :: Internet :: Proxy Servers',
'Topic :: Utilities',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: System :: Networking'
]
MODULES = (
'tproxy',
)
SCRIPTS = glob("bin/tproxy*")
def main():
if "--setuptools" in sys.argv:
sys.argv.remove("--setuptools")
from setuptools import setup
use_setuptools = True
else:
from distutils.core import setup
use_setuptools = False
tproxy = load_source("tproxy", os.path.join("tproxy",
"__init__.py"))
# read long description
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as f:
long_description = f.read()
PACKAGES = {}
for name in MODULES:
PACKAGES[name] = name.replace(".", "/")
DATA_FILES = [
('tproxy', ["LICENSE", "MANIFEST.in", "NOTICE", "README.rst",
"THANKS",])
]
options = dict(
name = 'tproxy',
version = tproxy.__version__,
description = 'WSGI HTTP Server for UNIX',
long_description = long_description,
author = 'Benoit Chesneau',
author_email = 'benoitc@e-engura.com',
license = 'MIT',
url = 'http://github.com/benoitc/tproxy',
classifiers = CLASSIFIERS,
packages = PACKAGES.keys(),
package_dir = PACKAGES,
scripts = SCRIPTS,
data_files = DATA_FILES,
)
setup(**options)
if __name__ == "__main__":
main()