1 | #!/usr/bin/env python
|
---|
2 | # -*- coding: utf-8 -*-
|
---|
3 | #
|
---|
4 | # Copyright (C) 2003-2018 Edgewall Software
|
---|
5 | # All rights reserved.
|
---|
6 | #
|
---|
7 | # This software is licensed as described in the file COPYING, which
|
---|
8 | # you should have received as part of this distribution. The terms
|
---|
9 | # are also available at http://trac.edgewall.org/wiki/TracLicense.
|
---|
10 | #
|
---|
11 | # This software consists of voluntary contributions made by many
|
---|
12 | # individuals. For the exact contribution history, see the revision
|
---|
13 | # history and logs, available at http://trac.edgewall.org/log/.
|
---|
14 |
|
---|
15 | import sys
|
---|
16 |
|
---|
17 | from setuptools import setup, find_packages
|
---|
18 |
|
---|
19 | min_python = (2, 7)
|
---|
20 | if sys.version_info < min_python:
|
---|
21 | print("Trac requires Python %d.%d or later" % min_python)
|
---|
22 | sys.exit(1)
|
---|
23 | if sys.version_info >= (3,):
|
---|
24 | print("Trac doesn't support Python 3 (yet)")
|
---|
25 | sys.exit(1)
|
---|
26 |
|
---|
27 | extra = {}
|
---|
28 |
|
---|
29 | try:
|
---|
30 | import babel
|
---|
31 |
|
---|
32 | from trac.dist import get_l10n_trac_cmdclass
|
---|
33 | extra['cmdclass'] = get_l10n_trac_cmdclass()
|
---|
34 |
|
---|
35 | except ImportError:
|
---|
36 | pass
|
---|
37 |
|
---|
38 | try:
|
---|
39 | import jinja2
|
---|
40 | except ImportError:
|
---|
41 | print("Jinja2 is needed by Trac setup, pre-installing")
|
---|
42 | # give some context to the warnings we might get when installing Jinja2
|
---|
43 |
|
---|
44 |
|
---|
45 | def readme():
|
---|
46 | # Don't use context manager (comment:21:ticket:12578)
|
---|
47 | f = open('README.rst')
|
---|
48 | content = f.read()
|
---|
49 | f.close()
|
---|
50 | return content
|
---|
51 |
|
---|
52 |
|
---|
53 | setup(
|
---|
54 | name = 'Trac',
|
---|
55 | version = '1.3.4',
|
---|
56 | description = 'Integrated SCM, wiki, issue tracker and project environment',
|
---|
57 | long_description = readme(),
|
---|
58 | author = 'Edgewall Software',
|
---|
59 | author_email = 'trac-dev@googlegroups.com',
|
---|
60 | license = 'BSD',
|
---|
61 | url = 'https://trac.edgewall.org/',
|
---|
62 | download_url = 'https://trac.edgewall.org/wiki/TracDownload',
|
---|
63 | classifiers = [
|
---|
64 | 'Environment :: Web Environment',
|
---|
65 | 'Framework :: Trac',
|
---|
66 | 'Intended Audience :: Developers',
|
---|
67 | 'License :: OSI Approved :: BSD License',
|
---|
68 | 'Operating System :: OS Independent',
|
---|
69 | 'Programming Language :: Python',
|
---|
70 | 'Programming Language :: Python :: 2',
|
---|
71 | 'Programming Language :: Python :: 2.7',
|
---|
72 | 'Topic :: Software Development :: Bug Tracking',
|
---|
73 | 'Topic :: Software Development :: Version Control',
|
---|
74 | ],
|
---|
75 |
|
---|
76 | packages = find_packages(exclude=['*.tests', 'tests.*', '*.tests.*']),
|
---|
77 | package_data = {
|
---|
78 | '': ['templates/*.*', 'templates/genshi/*'],
|
---|
79 | 'trac': ['htdocs/*.*', 'htdocs/README', 'htdocs/js/*.*',
|
---|
80 | 'htdocs/js/messages/*.*', 'htdocs/css/*.*',
|
---|
81 | 'htdocs/css/jquery-ui/*.*',
|
---|
82 | 'htdocs/css/jquery-ui/images/*.*',
|
---|
83 | 'htdocs/guide/*', 'locale/*/LC_MESSAGES/messages.mo',
|
---|
84 | 'locale/*/LC_MESSAGES/tracini.mo'],
|
---|
85 | 'trac.wiki': ['default-pages/*'],
|
---|
86 | 'trac.ticket': ['workflows/*.ini'],
|
---|
87 | 'tracopt': ['ticket/htdocs/*.js'],
|
---|
88 | },
|
---|
89 |
|
---|
90 | test_suite = 'trac.test.test_suite',
|
---|
91 | zip_safe = True,
|
---|
92 |
|
---|
93 | setup_requires = [
|
---|
94 | 'jinja2>=2.9.3',
|
---|
95 | ],
|
---|
96 | install_requires = [
|
---|
97 | 'setuptools>=0.6',
|
---|
98 | 'jinja2>=2.9.3',
|
---|
99 | ],
|
---|
100 | extras_require = {
|
---|
101 | 'genshi': ['Genshi>=0.6'],
|
---|
102 | 'babel': ['Babel>=0.9.5'],
|
---|
103 | 'mysql': ['PyMySQL'],
|
---|
104 | 'postgresql': ['psycopg2 >= 2.0'],
|
---|
105 | 'psycopg2': ['psycopg2 >= 2.0'],
|
---|
106 | 'psycopg2-binary': ['psycopg2-binary'],
|
---|
107 | 'pygments': ['Pygments>=1.0'],
|
---|
108 | 'rest': ['docutils>=0.3.9'],
|
---|
109 | 'textile': ['textile>=2.0'],
|
---|
110 | },
|
---|
111 |
|
---|
112 | entry_points = """
|
---|
113 | [console_scripts]
|
---|
114 | trac-admin = trac.admin.console:run
|
---|
115 | tracd = trac.web.standalone:main
|
---|
116 |
|
---|
117 | [trac.plugins]
|
---|
118 | trac.about = trac.about
|
---|
119 | trac.admin.console = trac.admin.console
|
---|
120 | trac.admin.web_ui = trac.admin.web_ui
|
---|
121 | trac.attachment = trac.attachment
|
---|
122 | trac.db.mysql = trac.db.mysql_backend[mysql]
|
---|
123 | trac.db.postgres = trac.db.postgres_backend
|
---|
124 | trac.db.sqlite = trac.db.sqlite_backend
|
---|
125 | trac.mimeview.patch = trac.mimeview.patch
|
---|
126 | trac.mimeview.pygments = trac.mimeview.pygments[pygments]
|
---|
127 | trac.mimeview.rst = trac.mimeview.rst[rest]
|
---|
128 | trac.mimeview.txtl = trac.mimeview.txtl[textile]
|
---|
129 | trac.notification.api = trac.notification.api
|
---|
130 | trac.notification.mail = trac.notification.mail
|
---|
131 | trac.notification.prefs = trac.notification.prefs
|
---|
132 | trac.prefs = trac.prefs.web_ui
|
---|
133 | trac.search = trac.search.web_ui
|
---|
134 | trac.ticket.admin = trac.ticket.admin
|
---|
135 | trac.ticket.batch = trac.ticket.batch
|
---|
136 | trac.ticket.query = trac.ticket.query
|
---|
137 | trac.ticket.notification = trac.ticket.notification
|
---|
138 | trac.ticket.report = trac.ticket.report
|
---|
139 | trac.ticket.roadmap = trac.ticket.roadmap
|
---|
140 | trac.ticket.web_ui = trac.ticket.web_ui
|
---|
141 | trac.timeline = trac.timeline.web_ui
|
---|
142 | trac.versioncontrol.admin = trac.versioncontrol.admin
|
---|
143 | trac.versioncontrol.svn_authz = trac.versioncontrol.svn_authz
|
---|
144 | trac.versioncontrol.web_ui = trac.versioncontrol.web_ui
|
---|
145 | trac.web.auth = trac.web.auth
|
---|
146 | trac.web.main = trac.web.main
|
---|
147 | trac.web.session = trac.web.session
|
---|
148 | trac.wiki.admin = trac.wiki.admin
|
---|
149 | trac.wiki.interwiki = trac.wiki.interwiki
|
---|
150 | trac.wiki.macros = trac.wiki.macros
|
---|
151 | trac.wiki.web_ui = trac.wiki.web_ui
|
---|
152 | trac.wiki.web_api = trac.wiki.web_api
|
---|
153 | tracopt.perm.authz_policy = tracopt.perm.authz_policy
|
---|
154 | tracopt.perm.config_perm_provider = tracopt.perm.config_perm_provider
|
---|
155 | tracopt.ticket.clone = tracopt.ticket.clone
|
---|
156 | tracopt.ticket.commit_updater = tracopt.ticket.commit_updater
|
---|
157 | tracopt.ticket.deleter = tracopt.ticket.deleter
|
---|
158 | tracopt.versioncontrol.git.git_fs = tracopt.versioncontrol.git.git_fs
|
---|
159 | tracopt.versioncontrol.svn.svn_fs = tracopt.versioncontrol.svn.svn_fs
|
---|
160 | tracopt.versioncontrol.svn.svn_prop = tracopt.versioncontrol.svn.svn_prop
|
---|
161 | """,
|
---|
162 |
|
---|
163 | **extra
|
---|
164 | )
|
---|