##// END OF EJS Templates
setup.py: bump Pygments minimum version to 2.2.0...
Thomas De Schampheleire -
r7786:bec4bc21 default
parent child Browse files
Show More
@@ -1,160 +1,160 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 platform
4 import platform
5 import sys
5 import sys
6
6
7 import setuptools
7 import setuptools
8 # monkey patch setuptools to use distutils owner/group functionality
8 # monkey patch setuptools to use distutils owner/group functionality
9 from setuptools.command import sdist
9 from setuptools.command import sdist
10
10
11
11
12 if sys.version_info < (2, 6) or sys.version_info >= (3,):
12 if sys.version_info < (2, 6) or sys.version_info >= (3,):
13 raise Exception('Kallithea requires python 2.7')
13 raise Exception('Kallithea requires python 2.7')
14
14
15
15
16 here = os.path.abspath(os.path.dirname(__file__))
16 here = os.path.abspath(os.path.dirname(__file__))
17
17
18
18
19 def _get_meta_var(name, data, callback_handler=None):
19 def _get_meta_var(name, data, callback_handler=None):
20 import re
20 import re
21 matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data)
21 matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data)
22 if matches:
22 if matches:
23 if not callable(callback_handler):
23 if not callable(callback_handler):
24 callback_handler = lambda v: v
24 callback_handler = lambda v: v
25
25
26 return callback_handler(eval(matches.groups()[0]))
26 return callback_handler(eval(matches.groups()[0]))
27
27
28 _meta = open(os.path.join(here, 'kallithea', '__init__.py'), 'rb')
28 _meta = open(os.path.join(here, 'kallithea', '__init__.py'), 'rb')
29 _metadata = _meta.read()
29 _metadata = _meta.read()
30 _meta.close()
30 _meta.close()
31
31
32 callback = lambda V: ('.'.join(map(str, V[:3])) + '.'.join(V[3:]))
32 callback = lambda V: ('.'.join(map(str, V[:3])) + '.'.join(V[3:]))
33 __version__ = _get_meta_var('VERSION', _metadata, callback)
33 __version__ = _get_meta_var('VERSION', _metadata, callback)
34 __license__ = _get_meta_var('__license__', _metadata)
34 __license__ = _get_meta_var('__license__', _metadata)
35 __author__ = _get_meta_var('__author__', _metadata)
35 __author__ = _get_meta_var('__author__', _metadata)
36 __url__ = _get_meta_var('__url__', _metadata)
36 __url__ = _get_meta_var('__url__', _metadata)
37 # defines current platform
37 # defines current platform
38 __platform__ = platform.system()
38 __platform__ = platform.system()
39
39
40 is_windows = __platform__ in ['Windows']
40 is_windows = __platform__ in ['Windows']
41
41
42 requirements = [
42 requirements = [
43 "alembic >= 0.8.0, < 1.1",
43 "alembic >= 0.8.0, < 1.1",
44 "gearbox < 1",
44 "gearbox < 1",
45 "waitress >= 0.8.8, < 1.4",
45 "waitress >= 0.8.8, < 1.4",
46 "WebOb >= 1.7, < 1.9",
46 "WebOb >= 1.7, < 1.9",
47 "backlash >= 0.1.2, < 1",
47 "backlash >= 0.1.2, < 1",
48 "TurboGears2 >= 2.3.10, < 2.5",
48 "TurboGears2 >= 2.3.10, < 2.5",
49 "tgext.routes >= 0.2.0, < 1",
49 "tgext.routes >= 0.2.0, < 1",
50 "Beaker >= 1.7.0, < 2",
50 "Beaker >= 1.7.0, < 2",
51 "WebHelpers >= 1.3, < 1.4",
51 "WebHelpers >= 1.3, < 1.4",
52 "WebHelpers2 >= 2.0, < 2.1",
52 "WebHelpers2 >= 2.0, < 2.1",
53 "FormEncode >= 1.3.0, < 1.4",
53 "FormEncode >= 1.3.0, < 1.4",
54 "SQLAlchemy >= 1.1, < 1.4",
54 "SQLAlchemy >= 1.1, < 1.4",
55 "Mako >= 0.9.0, < 1.1",
55 "Mako >= 0.9.0, < 1.1",
56 "Pygments >= 2.0, < 2.5",
56 "Pygments >= 2.2.0, < 2.5",
57 "Whoosh >= 2.5.0, < 2.8",
57 "Whoosh >= 2.5.0, < 2.8",
58 "celery >= 3.1, < 4.0", # TODO: celery 4 doesn't work
58 "celery >= 3.1, < 4.0", # TODO: celery 4 doesn't work
59 "Babel >= 1.3, < 2.8",
59 "Babel >= 1.3, < 2.8",
60 "python-dateutil >= 1.5.0, < 2.9",
60 "python-dateutil >= 1.5.0, < 2.9",
61 "Markdown >= 2.2.1, < 3.2",
61 "Markdown >= 2.2.1, < 3.2",
62 "docutils >= 0.11, < 0.15",
62 "docutils >= 0.11, < 0.15",
63 "URLObject >= 2.3.4, < 2.5",
63 "URLObject >= 2.3.4, < 2.5",
64 "Routes >= 1.13, < 2", # TODO: bumping to 2.0 will make test_file_annotation fail
64 "Routes >= 1.13, < 2", # TODO: bumping to 2.0 will make test_file_annotation fail
65 "dulwich >= 0.14.1, < 0.20",
65 "dulwich >= 0.14.1, < 0.20",
66 "mercurial >= 4.5, < 5.3",
66 "mercurial >= 4.5, < 5.3",
67 "decorator >= 3.3.2, < 4.5",
67 "decorator >= 3.3.2, < 4.5",
68 "Paste >= 2.0.3, < 3.1",
68 "Paste >= 2.0.3, < 3.1",
69 "bleach >= 3.0, < 3.2",
69 "bleach >= 3.0, < 3.2",
70 "Click >= 7.0, < 8",
70 "Click >= 7.0, < 8",
71 "ipaddr >= 2.1.10, < 2.3",
71 "ipaddr >= 2.1.10, < 2.3",
72 ]
72 ]
73
73
74 if not is_windows:
74 if not is_windows:
75 requirements.append("bcrypt >= 3.1.0, < 3.2")
75 requirements.append("bcrypt >= 3.1.0, < 3.2")
76
76
77 dependency_links = [
77 dependency_links = [
78 ]
78 ]
79
79
80 classifiers = [
80 classifiers = [
81 'Development Status :: 4 - Beta',
81 'Development Status :: 4 - Beta',
82 'Environment :: Web Environment',
82 'Environment :: Web Environment',
83 'Framework :: Pylons',
83 'Framework :: Pylons',
84 'Intended Audience :: Developers',
84 'Intended Audience :: Developers',
85 'License :: OSI Approved :: GNU General Public License (GPL)',
85 'License :: OSI Approved :: GNU General Public License (GPL)',
86 'Operating System :: OS Independent',
86 'Operating System :: OS Independent',
87 'Programming Language :: Python',
87 'Programming Language :: Python',
88 'Programming Language :: Python :: 2.7',
88 'Programming Language :: Python :: 2.7',
89 'Topic :: Software Development :: Version Control',
89 'Topic :: Software Development :: Version Control',
90 ]
90 ]
91
91
92
92
93 # additional files from project that goes somewhere in the filesystem
93 # additional files from project that goes somewhere in the filesystem
94 # relative to sys.prefix
94 # relative to sys.prefix
95 data_files = []
95 data_files = []
96
96
97 description = ('Kallithea is a fast and powerful management tool '
97 description = ('Kallithea is a fast and powerful management tool '
98 'for Mercurial and Git with a built in push/pull server, '
98 'for Mercurial and Git with a built in push/pull server, '
99 'full text search and code-review.')
99 'full text search and code-review.')
100
100
101 keywords = ' '.join([
101 keywords = ' '.join([
102 'kallithea', 'mercurial', 'git', 'code review',
102 'kallithea', 'mercurial', 'git', 'code review',
103 'repo groups', 'ldap', 'repository management', 'hgweb replacement',
103 'repo groups', 'ldap', 'repository management', 'hgweb replacement',
104 'hgwebdir', 'gitweb replacement', 'serving hgweb',
104 'hgwebdir', 'gitweb replacement', 'serving hgweb',
105 ])
105 ])
106
106
107 # long description
107 # long description
108 README_FILE = 'README.rst'
108 README_FILE = 'README.rst'
109 try:
109 try:
110 long_description = open(README_FILE).read()
110 long_description = open(README_FILE).read()
111 except IOError as err:
111 except IOError as err:
112 sys.stderr.write(
112 sys.stderr.write(
113 "[WARNING] Cannot find file specified as long_description (%s)\n"
113 "[WARNING] Cannot find file specified as long_description (%s)\n"
114 % README_FILE
114 % README_FILE
115 )
115 )
116 long_description = description
116 long_description = description
117
117
118
118
119 sdist_org = sdist.sdist
119 sdist_org = sdist.sdist
120 class sdist_new(sdist_org):
120 class sdist_new(sdist_org):
121 def initialize_options(self):
121 def initialize_options(self):
122 sdist_org.initialize_options(self)
122 sdist_org.initialize_options(self)
123 self.owner = self.group = 'root'
123 self.owner = self.group = 'root'
124 sdist.sdist = sdist_new
124 sdist.sdist = sdist_new
125
125
126 packages = setuptools.find_packages(exclude=['ez_setup'])
126 packages = setuptools.find_packages(exclude=['ez_setup'])
127
127
128 setuptools.setup(
128 setuptools.setup(
129 name='Kallithea',
129 name='Kallithea',
130 version=__version__,
130 version=__version__,
131 description=description,
131 description=description,
132 long_description=long_description,
132 long_description=long_description,
133 keywords=keywords,
133 keywords=keywords,
134 license=__license__,
134 license=__license__,
135 author=__author__,
135 author=__author__,
136 author_email='kallithea@sfconservancy.org',
136 author_email='kallithea@sfconservancy.org',
137 dependency_links=dependency_links,
137 dependency_links=dependency_links,
138 url=__url__,
138 url=__url__,
139 install_requires=requirements,
139 install_requires=requirements,
140 classifiers=classifiers,
140 classifiers=classifiers,
141 data_files=data_files,
141 data_files=data_files,
142 packages=packages,
142 packages=packages,
143 include_package_data=True,
143 include_package_data=True,
144 message_extractors={'kallithea': [
144 message_extractors={'kallithea': [
145 ('**.py', 'python', None),
145 ('**.py', 'python', None),
146 ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}),
146 ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}),
147 ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}),
147 ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}),
148 ('public/**', 'ignore', None)]},
148 ('public/**', 'ignore', None)]},
149 zip_safe=False,
149 zip_safe=False,
150 entry_points="""
150 entry_points="""
151 [console_scripts]
151 [console_scripts]
152 kallithea-api = kallithea.bin.kallithea_api:main
152 kallithea-api = kallithea.bin.kallithea_api:main
153 kallithea-gist = kallithea.bin.kallithea_gist:main
153 kallithea-gist = kallithea.bin.kallithea_gist:main
154 kallithea-config = kallithea.bin.kallithea_config:main
154 kallithea-config = kallithea.bin.kallithea_config:main
155 kallithea-cli = kallithea.bin.kallithea_cli:cli
155 kallithea-cli = kallithea.bin.kallithea_cli:cli
156
156
157 [paste.app_factory]
157 [paste.app_factory]
158 main = kallithea.config.middleware:make_app
158 main = kallithea.config.middleware:make_app
159 """,
159 """,
160 )
160 )
General Comments 0
You need to be logged in to leave comments. Login now