This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
forked from hendrix/hendrix
-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
85 lines (70 loc) · 2.24 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
84
85
from hendrix import __version__
import errno
import os
import sys
from setuptools import setup, find_packages
def file_name(rel_path):
dir_path = os.path.dirname(__file__)
return os.path.join(dir_path, rel_path)
def read(rel_path):
with open(file_name(rel_path)) as f:
return f.read()
def readlines(rel_path):
with open(file_name(rel_path)) as f:
ret = f.readlines()
return ret
def mkdir_p(path):
"recreate mkdir -p functionality"
try:
os.makedirs(path)
except OSError as exc: # Python >2.5
if exc.errno == errno.EEXIST and os.path.isdir(path):
pass
else:
raise
share_path = os.path.join(
os.path.dirname(sys.executable),
'share/hendrix'
)
mkdir_p(share_path)
setup(
name="hendrix",
version=__version__,
description="Pure python web server, based on Twisted, providing the One Obvious Way to do async and offbeat network traffic with django and other WSGI apps.",
author="hangarunderground",
author_email="justin@justinholmes.com",
packages=find_packages(),
url="https://github.com/hangarunderground/hendrix",
download_url=(
"https://github.com/hangarunderground/hendrix/tarball/"
"v" + __version__
),
long_description=read('README.md'),
classifiers=[
'Development Status :: 4 - Beta',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'Programming Language :: Python',
'Topic :: Internet',
'Topic :: Utilities',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: WSGI',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Server',
],
keywords=["django", "twisted", "async", "logging", "wsgi"],
scripts=[
'hendrix/utils/scripts/hx',
'hendrix/utils/scripts/install-hendrix-service'
],
data_files=[
(share_path, ['hendrix/utils/templates/init.d.j2', ]),
],
install_requires=readlines('requirements.txt'),
extras_require={
'ssl': ['pyopenssl', ],
'dev': readlines('requirements_dev.txt'),
}
)