forked from nascheme/quixote
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
72 lines (57 loc) · 2.27 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
#!/usr/bin/env python3
#try:
# from setuptools import setup
#except ImportError:
# print('(WARNING: importing distutils, not setuptools!)')
# from distutils.core import setup
# Setup script for Quixote
import sys
if sys.version_info < (3,6,0):
raise SystemExit("You need python 3.6.0 or later to run this script")
from distutils import core
from distutils.extension import Extension
from quixote.ptl.qx_distutils import qx_build_py
from quixote import __version__
# a fast htmltext type
htmltext = Extension(name="quixote.html._c_htmltext",
sources=["quixote/html/_c_htmltext.c"])
kw = {'name': "Quixote",
'version': __version__,
'description': "A small and flexible Python Web application framework",
'author': "The Quixote developers",
'author_email': "[email protected]",
'url': "http://www.quixote.ca/",
'license': "DFSG approved (see LICENSE.txt)",
'package_dir': {'quixote': 'quixote'},
'packages': ['quixote', 'quixote.demo', 'quixote.form',
'quixote.html', 'quixote.ptl',
'quixote.server'],
'ext_modules': [],
'cmdclass': {'build_py': qx_build_py},
# 'test_suite' : 'nose.collector'
}
build_extensions = sys.platform != 'win32'
if build_extensions:
kw['ext_modules'].append(htmltext)
# 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',
'Programming Language :: Python :: 3 :: Only',
]
if 'download_url' in core.setup_keywords:
kw['download_url'] = ('http://quixote.ca/releases/'
'Quixote-%s.tar.gz' % kw['version'])
if 'url' in core.setup_keywords:
kw['url'] = 'http://www.quixote.ca/'
if 'platforms' in core.setup_keywords:
kw['platforms'] = 'Most'
core.setup(**kw)