forked from toscawidgets/tw2.core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
114 lines (101 loc) · 3.08 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
"""Setuptools setup file"""
import sys
import os
import logging
from setuptools import setup
# Ridiculous as it may seem, we need to import multiprocessing and logging here
# in order to get tests to pass smoothly on python 2.7.
try:
import multiprocessing
import logging
except:
pass
def get_description(fname='README.rst'):
# Adapted from PEAK-Rules' setup.py
# Get our long description from the documentation
f = file(fname)
lines = []
for line in f:
if not line.strip():
break # skip to first blank line
for line in f:
if line.startswith('Documentation contents'):
break # read to "Documentation contents..."
lines.append(line)
f.close()
return ''.join(lines)
# Requirements to install buffet plugins and engines
_extra_genshi = ["Genshi >= 0.3.5"]
_extra_mako = ["Mako >= 0.1.1"]
_extra_jinja = ["jinja2"]
_extra_kajiki = ["kajiki"]
_extra_chameleon = ["chameleon"]
requires = [
'WebOb>=0.9.7',
'simplejson >= 2.0',
'PasteDeploy',
'speaklater',
'decorator',
'markupsafe',
]
if sys.version_info[0] == 2 and sys.version_info[1] <= 5:
requires.append('WebOb<=1.1.1')
setup(
name='tw2.core',
version='2.1.3',
description="Web widget creation toolkit based on TurboGears widgets",
long_description = get_description(),
install_requires=requires,
tests_require = [
'nose',
'coverage',
'BeautifulSoup',
'FormEncode',
'WebTest',
'strainer',
] + \
_extra_genshi + \
_extra_mako + \
_extra_jinja + \
_extra_kajiki + \
_extra_chameleon,
test_suite = 'nose.collector',
extras_require = {
'genshi': _extra_genshi,
'mako': _extra_mako,
'jinja': _extra_jinja,
'kajiki': _extra_kajiki,
'chameleon': _extra_chameleon,
},
url = "http://toscawidgets.org/",
download_url = "http://toscawidgets.org/download/",
author='Paul Johnston, Christopher Perkins, Alberto Valverde & contributors',
author_email='[email protected]',
license='MIT',
packages = ['tw2', 'tw2.core'],
namespace_packages = ['tw2'],
include_package_data=True,
exclude_package_data={"thirdparty" : ["*"]},
entry_points="""
[tw2.widgets]
widgets = tw2.core
[paste.filter_app_factory]
middleware = tw2.core.middleware:make_middleware
[distutils.commands]
archive_tw2_resources = tw2.core.command:archive_tw2_resources
""",
zip_safe=False,
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Environment :: Web Environment :: ToscaWidgets',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Internet :: WWW/HTTP :: WSGI',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware',
'Topic :: Software Development :: Widget Sets',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
)