##// END OF EJS Templates
setup: bump mercurial requirement to 2.9...
Andrew Shadura -
r5010:0756cfda stable
parent child Browse files
Show More
@@ -1,180 +1,180 b''
1 #!/usr/bin/env python2
1 #!/usr/bin/env python2
2 # -*- coding: utf-8 -*-
2 # -*- coding: utf-8 -*-
3 import os
3 import os
4 import sys
4 import sys
5 import platform
5 import platform
6
6
7 if sys.version_info < (2, 6):
7 if sys.version_info < (2, 6):
8 raise Exception('Kallithea requires python 2.6 or 2.7')
8 raise Exception('Kallithea requires python 2.6 or 2.7')
9
9
10
10
11 here = os.path.abspath(os.path.dirname(__file__))
11 here = os.path.abspath(os.path.dirname(__file__))
12
12
13
13
14 def _get_meta_var(name, data, callback_handler=None):
14 def _get_meta_var(name, data, callback_handler=None):
15 import re
15 import re
16 matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data)
16 matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data)
17 if matches:
17 if matches:
18 if not callable(callback_handler):
18 if not callable(callback_handler):
19 callback_handler = lambda v: v
19 callback_handler = lambda v: v
20
20
21 return callback_handler(eval(matches.groups()[0]))
21 return callback_handler(eval(matches.groups()[0]))
22
22
23 _meta = open(os.path.join(here, 'kallithea', '__init__.py'), 'rb')
23 _meta = open(os.path.join(here, 'kallithea', '__init__.py'), 'rb')
24 _metadata = _meta.read()
24 _metadata = _meta.read()
25 _meta.close()
25 _meta.close()
26
26
27 callback = lambda V: ('.'.join(map(str, V[:3])) + '.'.join(V[3:]))
27 callback = lambda V: ('.'.join(map(str, V[:3])) + '.'.join(V[3:]))
28 __version__ = _get_meta_var('VERSION', _metadata, callback)
28 __version__ = _get_meta_var('VERSION', _metadata, callback)
29 __license__ = _get_meta_var('__license__', _metadata)
29 __license__ = _get_meta_var('__license__', _metadata)
30 __author__ = _get_meta_var('__author__', _metadata)
30 __author__ = _get_meta_var('__author__', _metadata)
31 __url__ = _get_meta_var('__url__', _metadata)
31 __url__ = _get_meta_var('__url__', _metadata)
32 # defines current platform
32 # defines current platform
33 __platform__ = platform.system()
33 __platform__ = platform.system()
34
34
35 is_windows = __platform__ in ['Windows']
35 is_windows = __platform__ in ['Windows']
36
36
37 requirements = [
37 requirements = [
38 "waitress==0.8.8",
38 "waitress==0.8.8",
39 "webob==1.0.8",
39 "webob==1.0.8",
40 "webtest==1.4.3",
40 "webtest==1.4.3",
41 "Pylons==1.0.0",
41 "Pylons==1.0.0",
42 "Beaker==1.6.4",
42 "Beaker==1.6.4",
43 "WebHelpers==1.3",
43 "WebHelpers==1.3",
44 "formencode>=1.2.4,<=1.2.6",
44 "formencode>=1.2.4,<=1.2.6",
45 "SQLAlchemy==0.7.10",
45 "SQLAlchemy==0.7.10",
46 "Mako>=0.9.0,<=1.0.0",
46 "Mako>=0.9.0,<=1.0.0",
47 "pygments>=1.5",
47 "pygments>=1.5",
48 "whoosh>=2.4.0,<=2.5.7",
48 "whoosh>=2.4.0,<=2.5.7",
49 "celery>=2.2.5,<2.3",
49 "celery>=2.2.5,<2.3",
50 "babel>=0.9.6,<=1.3",
50 "babel>=0.9.6,<=1.3",
51 "python-dateutil>=1.5.0,<2.0.0",
51 "python-dateutil>=1.5.0,<2.0.0",
52 "markdown==2.2.1",
52 "markdown==2.2.1",
53 "docutils>=0.8.1,<=0.11",
53 "docutils>=0.8.1,<=0.11",
54 "simplejson==2.5.2",
54 "simplejson==2.5.2",
55 "mock",
55 "mock",
56 "pycrypto>=2.6.0,<=2.6.1",
56 "pycrypto>=2.6.0,<=2.6.1",
57 "URLObject==2.3.4",
57 "URLObject==2.3.4",
58 "Routes==1.13",
58 "Routes==1.13",
59 "dulwich>=0.9.9,<=0.9.9",
59 "dulwich>=0.9.9,<=0.9.9",
60 ]
60 ]
61
61
62 if sys.version_info < (2, 7):
62 if sys.version_info < (2, 7):
63 requirements.append("importlib==1.0.1")
63 requirements.append("importlib==1.0.1")
64 requirements.append("unittest2")
64 requirements.append("unittest2")
65 requirements.append("argparse")
65 requirements.append("argparse")
66
66
67 requirements.append("mercurial>=2.8.2,<3.4")
67 requirements.append("mercurial>=2.9,<3.4")
68 if not is_windows:
68 if not is_windows:
69 requirements.append("py-bcrypt>=0.3.0,<=0.4")
69 requirements.append("py-bcrypt>=0.3.0,<=0.4")
70
70
71
71
72 dependency_links = [
72 dependency_links = [
73 ]
73 ]
74
74
75 classifiers = [
75 classifiers = [
76 'Development Status :: 4 - Beta',
76 'Development Status :: 4 - Beta',
77 'Environment :: Web Environment',
77 'Environment :: Web Environment',
78 'Framework :: Pylons',
78 'Framework :: Pylons',
79 'Intended Audience :: Developers',
79 'Intended Audience :: Developers',
80 'License :: OSI Approved :: GNU General Public License (GPL)',
80 'License :: OSI Approved :: GNU General Public License (GPL)',
81 'Operating System :: OS Independent',
81 'Operating System :: OS Independent',
82 'Programming Language :: Python',
82 'Programming Language :: Python',
83 'Programming Language :: Python :: 2.6',
83 'Programming Language :: Python :: 2.6',
84 'Programming Language :: Python :: 2.7',
84 'Programming Language :: Python :: 2.7',
85 'Topic :: Software Development :: Version Control',
85 'Topic :: Software Development :: Version Control',
86 ]
86 ]
87
87
88
88
89 # additional files from project that goes somewhere in the filesystem
89 # additional files from project that goes somewhere in the filesystem
90 # relative to sys.prefix
90 # relative to sys.prefix
91 data_files = []
91 data_files = []
92
92
93 # additional files that goes into package itself
93 # additional files that goes into package itself
94 package_data = {'kallithea': ['i18n/*/LC_MESSAGES/*.mo', ], }
94 package_data = {'kallithea': ['i18n/*/LC_MESSAGES/*.mo', ], }
95
95
96 description = ('Kallithea is a fast and powerful management tool '
96 description = ('Kallithea is a fast and powerful management tool '
97 'for Mercurial and Git with a built in push/pull server, '
97 'for Mercurial and Git with a built in push/pull server, '
98 'full text search and code-review.')
98 'full text search and code-review.')
99
99
100 keywords = ' '.join([
100 keywords = ' '.join([
101 'kallithea', 'mercurial', 'git', 'code review',
101 'kallithea', 'mercurial', 'git', 'code review',
102 'repo groups', 'ldap', 'repository management', 'hgweb replacement',
102 'repo groups', 'ldap', 'repository management', 'hgweb replacement',
103 'hgwebdir', 'gitweb replacement', 'serving hgweb',
103 'hgwebdir', 'gitweb replacement', 'serving hgweb',
104 ])
104 ])
105
105
106 # long description
106 # long description
107 README_FILE = 'README.rst'
107 README_FILE = 'README.rst'
108 CHANGELOG_FILE = 'docs/changelog.rst'
108 CHANGELOG_FILE = 'docs/changelog.rst'
109 try:
109 try:
110 long_description = open(README_FILE).read() + '\n\n' + \
110 long_description = open(README_FILE).read() + '\n\n' + \
111 open(CHANGELOG_FILE).read()
111 open(CHANGELOG_FILE).read()
112
112
113 except IOError, err:
113 except IOError, err:
114 sys.stderr.write(
114 sys.stderr.write(
115 "[WARNING] Cannot find file specified as long_description (%s)\n or "
115 "[WARNING] Cannot find file specified as long_description (%s)\n or "
116 "changelog (%s) skipping that file" % (README_FILE, CHANGELOG_FILE)
116 "changelog (%s) skipping that file" % (README_FILE, CHANGELOG_FILE)
117 )
117 )
118 long_description = description
118 long_description = description
119
119
120 try:
120 try:
121 from setuptools import setup, find_packages
121 from setuptools import setup, find_packages
122 except ImportError:
122 except ImportError:
123 from ez_setup import use_setuptools
123 from ez_setup import use_setuptools
124 use_setuptools()
124 use_setuptools()
125 from setuptools import setup, find_packages
125 from setuptools import setup, find_packages
126 # packages
126 # packages
127 packages = find_packages(exclude=['ez_setup'])
127 packages = find_packages(exclude=['ez_setup'])
128
128
129 setup(
129 setup(
130 name='Kallithea',
130 name='Kallithea',
131 version=__version__,
131 version=__version__,
132 description=description,
132 description=description,
133 long_description=long_description,
133 long_description=long_description,
134 keywords=keywords,
134 keywords=keywords,
135 license=__license__,
135 license=__license__,
136 author=__author__,
136 author=__author__,
137 author_email='kallithea@sfconservancy.org',
137 author_email='kallithea@sfconservancy.org',
138 dependency_links=dependency_links,
138 dependency_links=dependency_links,
139 url=__url__,
139 url=__url__,
140 install_requires=requirements,
140 install_requires=requirements,
141 classifiers=classifiers,
141 classifiers=classifiers,
142 setup_requires=["PasteScript>=1.6.3"],
142 setup_requires=["PasteScript>=1.6.3"],
143 data_files=data_files,
143 data_files=data_files,
144 packages=packages,
144 packages=packages,
145 include_package_data=True,
145 include_package_data=True,
146 test_suite='nose.collector',
146 test_suite='nose.collector',
147 package_data=package_data,
147 package_data=package_data,
148 message_extractors={'kallithea': [
148 message_extractors={'kallithea': [
149 ('**.py', 'python', None),
149 ('**.py', 'python', None),
150 ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}),
150 ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}),
151 ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}),
151 ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}),
152 ('public/**', 'ignore', None)]},
152 ('public/**', 'ignore', None)]},
153 zip_safe=False,
153 zip_safe=False,
154 paster_plugins=['PasteScript', 'Pylons'],
154 paster_plugins=['PasteScript', 'Pylons'],
155 entry_points="""
155 entry_points="""
156 [console_scripts]
156 [console_scripts]
157 kallithea-api = kallithea.bin.kallithea_api:main
157 kallithea-api = kallithea.bin.kallithea_api:main
158 kallithea-gist = kallithea.bin.kallithea_gist:main
158 kallithea-gist = kallithea.bin.kallithea_gist:main
159 kallithea-config = kallithea.bin.kallithea_config:main
159 kallithea-config = kallithea.bin.kallithea_config:main
160
160
161 [paste.app_factory]
161 [paste.app_factory]
162 main = kallithea.config.middleware:make_app
162 main = kallithea.config.middleware:make_app
163
163
164 [paste.app_install]
164 [paste.app_install]
165 main = pylons.util:PylonsInstaller
165 main = pylons.util:PylonsInstaller
166
166
167 [paste.global_paster_command]
167 [paste.global_paster_command]
168 setup-db=kallithea.lib.paster_commands.setup_db:Command
168 setup-db=kallithea.lib.paster_commands.setup_db:Command
169 cleanup-repos=kallithea.lib.paster_commands.cleanup:Command
169 cleanup-repos=kallithea.lib.paster_commands.cleanup:Command
170 update-repoinfo=kallithea.lib.paster_commands.update_repoinfo:Command
170 update-repoinfo=kallithea.lib.paster_commands.update_repoinfo:Command
171 make-rcext=kallithea.lib.paster_commands.make_rcextensions:Command
171 make-rcext=kallithea.lib.paster_commands.make_rcextensions:Command
172 repo-scan=kallithea.lib.paster_commands.repo_scan:Command
172 repo-scan=kallithea.lib.paster_commands.repo_scan:Command
173 cache-keys=kallithea.lib.paster_commands.cache_keys:Command
173 cache-keys=kallithea.lib.paster_commands.cache_keys:Command
174 ishell=kallithea.lib.paster_commands.ishell:Command
174 ishell=kallithea.lib.paster_commands.ishell:Command
175 make-index=kallithea.lib.paster_commands.make_index:Command
175 make-index=kallithea.lib.paster_commands.make_index:Command
176 upgrade-db=kallithea.lib.dbmigrate:UpgradeDb
176 upgrade-db=kallithea.lib.dbmigrate:UpgradeDb
177 celeryd=kallithea.lib.celerypylons.commands:CeleryDaemonCommand
177 celeryd=kallithea.lib.celerypylons.commands:CeleryDaemonCommand
178 install-iis=kallithea.lib.paster_commands.install_iis:Command
178 install-iis=kallithea.lib.paster_commands.install_iis:Command
179 """,
179 """,
180 )
180 )
General Comments 0
You need to be logged in to leave comments. Login now