1- # -*- coding: utf-8 -*-
1+ from setuptools import setup
22
3- # Quickstarted Options:
4- #
5- # sqlalchemy: {{sqlalchemy}}
6- # auth: {{auth}}
7- # mako: {{mako}}
8- #
9- #
10-
11- # This is just a work-around for a Python2.7 issue causing
12- # interpreter crash at exit when trying to log an info message.
13- try:
14- import logging
15- import multiprocessing
16- except:
17- pass
18-
19- import sys
20- py_version = sys.version_info[:2]
21-
22- try:
23- from setuptools import setup, find_packages
24- except ImportError:
25- from ez_setup import use_setuptools
26- use_setuptools()
27- from setuptools import setup, find_packages
28-
29- testpkgs = [
30- 'WebTest >= 1.2.3',
31- 'pytest',
32- 'coverage',
33- 'gearbox'
34- ]
35-
36- install_requires = [
37- "TurboGears2 >= 2.4.3",
38- "Beaker >= 1.8.0",
39- {{if kajiki}}
40- "Kajiki >= 0.6.3",
41- {{endif}}
42- {{if genshi}}
43- "Genshi",
44- {{endif}}
45- {{if mako}}
46- "Mako",
47- {{endif}}
48- {{if sqlalchemy}}
49- "zope.sqlalchemy >= 1.2",
50- "sqlalchemy < 3.0",
51- {{endif}}
52- {{if sqlalchemy and migrations}}
53- "alembic",
54- {{endif}}
55- {{if ming}}
56- "ming>=0.4.3",
57- {{endif}}
58- {{if auth}}
59- "repoze.who",
60- {{endif}}
61- "WebHelpers2"
62- ]
63-
64- if py_version != (3, 2):
65- # Babel not available on 3.2
66- install_requires.append("Babel")
67-
68- {{if jinja}}
69- if py_version == (3, 2):
70- # jinja2 2.7 is incompatible with Python 3.2
71- install_requires.append('jinja2 < 2.7')
72- else:
73- install_requires.append('jinja2')
74- {{endif}}
75-
76- setup(
77- name='{{project}}',
78- version='0.1',
79- description='',
80- author='',
81- author_email='',
82- url='',
83- packages=find_packages(exclude=['ez_setup']),
84- install_requires=install_requires,
85- include_package_data=True,
86- extras_require={
87- 'testing': testpkgs
88- },
89- package_data={'{{package}}': [
90- 'i18n/*/LC_MESSAGES/*.mo',
91- 'templates/*/*',
92- 'public/*/*'
93- ]},
94- message_extractors={'{{package}}': [
95- ('**.py', 'python', None),
96- {{if mako}}
97- ('templates/**.mak', 'mako', None),
98- {{endif}}
99- {{if kajiki}}
100- ('templates/**.xhtml', 'kajiki', {'strip_text': False, 'extract_python': True}),
101- {{endif}}
102- {{if jinja}}
103- ('templates/**.jinja', 'jinja2', None),
104- {{endif}}
105- {{if genshi}}
106- ('templates/**.html', 'genshi', None),
107- {{endif}}
108- {{babel_templates_extractor}}('public/**', 'ignore', None)
109- ]},
110- entry_points={
111- 'paste.app_factory': [
112- 'main = {{package}}.config.application:make_app'
113- ],
114- 'gearbox.plugins': [
115- 'turbogears-devtools = tg.devtools'
116- ]
117- },
118- zip_safe=False
119- )
3+ if __name__ == "__main__":
4+ setup()
0 commit comments