-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
50 lines (43 loc) · 1.71 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
#!/usr/bin/env python
import sys
from distutils import core
from distutils.extension import Extension
from scgi.__init__ import __version__
# Ensure that version number is correct.
def _check_version_numbers():
import re
PAT = re.compile(r'(^|VERSION ")%s\b' % re.escape(__version__), re.M)
for fn in ["apache1/mod_scgi.c", "apache2/mod_scgi.c"]:
if not PAT.search(open(fn).read(200)):
raise AssertionError("version number mismatch in %r" % fn)
if 'sdist' in sys.argv[1:]:
_check_version_numbers()
kw = dict(
name = "scgi",
version = __version__,
description = "A Python package for implementing SCGI servers.",
author = "Neil Schemenauer",
author_email = "[email protected]",
#url = "http://",
license = "DFSG approved (see LICENSE.txt)",
packages = ['scgi'],
ext_modules = [Extension(name="scgi.passfd", sources=['scgi/passfd.c'])],
)
# If we're running Python 2.3, add extra information
if hasattr(core, 'setup_keywords'):
if 'classifiers' in core.setup_keywords:
kw['classifiers'] = ['Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'License :: DFSG approved',
'Intended Audience :: Developers',
'Operating System :: Unix',
'Operating System :: Microsoft :: Windows',
'Operating System :: MacOS :: MacOS X',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
]
if 'download_url' in core.setup_keywords:
kw['download_url'] = ('http://python.ca/scgi/releases/'
'scgi-%s.tar.gz' % kw['version'])
if 'url' in core.setup_keywords:
kw['url'] = 'http://python.ca/scgi/'
core.setup(**kw)