debian-quixote3/setup.py

73 lines
2.3 KiB
Python
Raw Normal View History

2016-03-31 23:17:06 +02:00
#!/usr/bin/env python3
#try:
# from setuptools import setup
#except ImportError:
2016-03-31 23:17:06 +02:00
# print('(WARNING: importing distutils, not setuptools!)')
# from distutils.core import setup
2006-03-16 01:58:21 +01:00
# Setup script for Quixote
import sys
2016-03-31 23:17:06 +02:00
if sys.version_info < (3,4,0):
raise SystemExit("You need python 3.4.0 or later to run this script")
2006-03-16 01:58:21 +01:00
from distutils import core
from distutils.extension import Extension
from quixote.ptl.qx_distutils import qx_build_py
2007-04-06 08:01:32 +02:00
from quixote import __version__
2006-03-16 01:58:21 +01:00
# a fast htmltext type
htmltext = Extension(name="quixote.html._c_htmltext",
sources=["quixote/html/_c_htmltext.c"])
2006-03-16 01:58:21 +01:00
kw = {'name': "Quixote",
2007-04-06 08:01:32 +02:00
'version': __version__,
'description': "A small and flexible Python Web application framework",
2007-04-06 08:01:32 +02:00
'author': "The Quixote developers",
'author_email': "webmaster@quixote.ca",
'url': "http://www.quixote.ca/",
'license': "DFSG approved (see LICENSE.txt)",
2006-03-16 01:58:21 +01:00
'package_dir': {'quixote': 'quixote'},
2006-03-16 01:58:21 +01:00
'packages': ['quixote', 'quixote.demo', 'quixote.form',
'quixote.html', 'quixote.ptl',
'quixote.server'],
'ext_modules': [],
'cmdclass': {'build_py': qx_build_py},
# 'test_suite' : 'nose.collector'
2006-03-16 01:58:21 +01:00
}
build_extensions = sys.platform != 'win32'
if build_extensions:
2016-04-05 18:13:58 +02:00
kw['ext_modules'].append(htmltext)
2006-03-16 01:58:21 +01:00
# If we're running Python 2.3, add extra information
if hasattr(core, 'setup_keywords'):
if 'classifiers' in core.setup_keywords:
2017-11-27 19:23:27 +01:00
kw['classifiers'] = [
'Development Status :: 5 - Production/Stable',
2006-03-16 01:58:21 +01:00
'Environment :: Web Environment',
'License :: DFSG approved',
2006-03-16 01:58:21 +01:00
'Intended Audience :: Developers',
'Operating System :: Unix',
'Operating System :: Microsoft :: Windows',
'Operating System :: MacOS :: MacOS X',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
2017-11-27 19:23:27 +01:00
'Programming Language :: Python :: 3 :: Only',
2006-03-16 01:58:21 +01:00
]
if 'download_url' in core.setup_keywords:
2007-04-06 08:01:32 +02:00
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/'
2007-04-06 08:01:32 +02:00
if 'platforms' in core.setup_keywords:
kw['platforms'] = 'Most'
2006-03-16 01:58:21 +01:00
core.setup(**kw)