##// END OF EJS Templates
Fixes for pypi - increment version to 0.0
Mads Kiilerich -
r4246:cc48c154 0.0 default
parent child Browse files
Show More
@@ -1,95 +1,95 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 # This program is free software: you can redistribute it and/or modify
2 # This program is free software: you can redistribute it and/or modify
3 # it under the terms of the GNU General Public License as published by
3 # it under the terms of the GNU General Public License as published by
4 # the Free Software Foundation, either version 3 of the License, or
4 # the Free Software Foundation, either version 3 of the License, or
5 # (at your option) any later version.
5 # (at your option) any later version.
6 #
6 #
7 # This program is distributed in the hope that it will be useful,
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 # GNU General Public License for more details.
10 # GNU General Public License for more details.
11 #
11 #
12 # You should have received a copy of the GNU General Public License
12 # You should have received a copy of the GNU General Public License
13 # along with this program. If not, see <http://www.gnu.org/licenses/>.
13 # along with this program. If not, see <http://www.gnu.org/licenses/>.
14 """
14 """
15 kallithea.__init__
15 kallithea.__init__
16 ~~~~~~~~~~~~~~~~~~
16 ~~~~~~~~~~~~~~~~~~
17
17
18 Kallithea, a web based repository management based on pylons
18 Kallithea, a web based repository management based on pylons
19 versioning implementation: http://www.python.org/dev/peps/pep-0386/
19 versioning implementation: http://www.python.org/dev/peps/pep-0386/
20
20
21 This file was forked by the Kallithea project in July 2014.
21 This file was forked by the Kallithea project in July 2014.
22 Original author and date, and relevant copyright and licensing information is below:
22 Original author and date, and relevant copyright and licensing information is below:
23 :created_on: Apr 9, 2010
23 :created_on: Apr 9, 2010
24 :author: marcink
24 :author: marcink
25 :copyright: (c) 2013 RhodeCode GmbH, (C) 2014 Bradley M. Kuhn, and others.
25 :copyright: (c) 2013 RhodeCode GmbH, (C) 2014 Bradley M. Kuhn, and others.
26 :license: GPLv3, see LICENSE.md for more details.
26 :license: GPLv3, see LICENSE.md for more details.
27 """
27 """
28
28
29 import sys
29 import sys
30 import platform
30 import platform
31
31
32 VERSION = (0,)
32 VERSION = (0, 0)
33 BACKENDS = {
33 BACKENDS = {
34 'hg': 'Mercurial repository',
34 'hg': 'Mercurial repository',
35 'git': 'Git repository',
35 'git': 'Git repository',
36 }
36 }
37
37
38 CELERY_ON = False
38 CELERY_ON = False
39 CELERY_EAGER = False
39 CELERY_EAGER = False
40
40
41 # link to config for pylons
41 # link to config for pylons
42 CONFIG = {}
42 CONFIG = {}
43
43
44 # Linked module for extensions
44 # Linked module for extensions
45 EXTENSIONS = {}
45 EXTENSIONS = {}
46
46
47 # BRAND controls internal references in database and config to the products
47 # BRAND controls internal references in database and config to the products
48 # own name.
48 # own name.
49 #
49 #
50 # NOTE: If you want compatibility with a database that was originally created
50 # NOTE: If you want compatibility with a database that was originally created
51 # for use with the RhodeCode software product, change BRAND to "rhodecode",
51 # for use with the RhodeCode software product, change BRAND to "rhodecode",
52 # either by editing here or by creating a new file:
52 # either by editing here or by creating a new file:
53 # echo "BRAND = 'rhodecode'" > kallithea/brand.py
53 # echo "BRAND = 'rhodecode'" > kallithea/brand.py
54
54
55 BRAND = "kallithea"
55 BRAND = "kallithea"
56 try:
56 try:
57 from kallithea.brand import BRAND
57 from kallithea.brand import BRAND
58 except ImportError:
58 except ImportError:
59 pass
59 pass
60
60
61 # Prefix for the ui and settings table names
61 # Prefix for the ui and settings table names
62 DB_PREFIX = (BRAND + "_") if BRAND != "kallithea" else ""
62 DB_PREFIX = (BRAND + "_") if BRAND != "kallithea" else ""
63
63
64 # Users.extern_type and .extern_name value for local users
64 # Users.extern_type and .extern_name value for local users
65 EXTERN_TYPE_INTERNAL = BRAND if BRAND != 'kallithea' else 'internal'
65 EXTERN_TYPE_INTERNAL = BRAND if BRAND != 'kallithea' else 'internal'
66
66
67 # db_migrate_version.repository_id value, same as kallithea/lib/dbmigrate/migrate.cfg
67 # db_migrate_version.repository_id value, same as kallithea/lib/dbmigrate/migrate.cfg
68 DB_MIGRATIONS = BRAND + "_db_migrations"
68 DB_MIGRATIONS = BRAND + "_db_migrations"
69
69
70 try:
70 try:
71 from kallithea.lib import get_current_revision
71 from kallithea.lib import get_current_revision
72 _rev = get_current_revision(quiet=True)
72 _rev = get_current_revision(quiet=True)
73 if _rev and len(VERSION) > 3:
73 if _rev and len(VERSION) > 3:
74 VERSION += ('%s' % _rev[0],)
74 VERSION += ('%s' % _rev[0],)
75 except ImportError:
75 except ImportError:
76 pass
76 pass
77
77
78 __version__ = ('.'.join((str(each) for each in VERSION[:3])))
78 __version__ = ('.'.join((str(each) for each in VERSION[:3])))
79 __dbversion__ = 31 # defines current db version for migrations
79 __dbversion__ = 31 # defines current db version for migrations
80 __platform__ = platform.system()
80 __platform__ = platform.system()
81 __license__ = 'GPLv3'
81 __license__ = 'GPLv3'
82 __py_version__ = sys.version_info
82 __py_version__ = sys.version_info
83 __author__ = "Various Authors"
83 __author__ = "Various Authors"
84 __url__ = 'https://kallithea-scm.org/'
84 __url__ = 'https://kallithea-scm.org/'
85
85
86 is_windows = __platform__ in ['Windows']
86 is_windows = __platform__ in ['Windows']
87 is_unix = not is_windows
87 is_unix = not is_windows
88
88
89 if len(VERSION) > 3:
89 if len(VERSION) > 3:
90 __version__ += '.'+VERSION[3]
90 __version__ += '.'+VERSION[3]
91
91
92 if len(VERSION) > 4:
92 if len(VERSION) > 4:
93 __version__ += VERSION[4]
93 __version__ += VERSION[4]
94 else:
94 else:
95 __version__ += '0'
95 __version__ += '0'
@@ -1,182 +1,183 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 import os
2 import os
3 import sys
3 import sys
4 import platform
4 import platform
5
5
6 if sys.version_info < (2, 5):
6 if sys.version_info < (2, 5):
7 raise Exception('Kallithea requires python 2.5 or later')
7 raise Exception('Kallithea requires python 2.5 or later')
8
8
9
9
10 here = os.path.abspath(os.path.dirname(__file__))
10 here = os.path.abspath(os.path.dirname(__file__))
11
11
12
12
13 def _get_meta_var(name, data, callback_handler=None):
13 def _get_meta_var(name, data, callback_handler=None):
14 import re
14 import re
15 matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data)
15 matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data)
16 if matches:
16 if matches:
17 if not callable(callback_handler):
17 if not callable(callback_handler):
18 callback_handler = lambda v: v
18 callback_handler = lambda v: v
19
19
20 return callback_handler(eval(matches.groups()[0]))
20 return callback_handler(eval(matches.groups()[0]))
21
21
22 _meta = open(os.path.join(here, 'kallithea', '__init__.py'), 'rb')
22 _meta = open(os.path.join(here, 'kallithea', '__init__.py'), 'rb')
23 _metadata = _meta.read()
23 _metadata = _meta.read()
24 _meta.close()
24 _meta.close()
25
25
26 callback = lambda V: ('.'.join(map(str, V[:3])) + '.'.join(V[3:]))
26 callback = lambda V: ('.'.join(map(str, V[:3])) + '.'.join(V[3:]))
27 __version__ = _get_meta_var('VERSION', _metadata, callback)
27 __version__ = _get_meta_var('VERSION', _metadata, callback)
28 __license__ = _get_meta_var('__license__', _metadata)
28 __license__ = _get_meta_var('__license__', _metadata)
29 __author__ = _get_meta_var('__author__', _metadata)
29 __author__ = _get_meta_var('__author__', _metadata)
30 __url__ = _get_meta_var('__url__', _metadata)
30 __url__ = _get_meta_var('__url__', _metadata)
31 # defines current platform
31 # defines current platform
32 __platform__ = platform.system()
32 __platform__ = platform.system()
33
33
34 is_windows = __platform__ in ['Windows']
34 is_windows = __platform__ in ['Windows']
35
35
36 requirements = [
36 requirements = [
37 "waitress==0.8.8",
37 "waitress==0.8.8",
38 "webob==1.0.8",
38 "webob==1.0.8",
39 "webtest==1.4.3",
39 "webtest==1.4.3",
40 "Pylons==1.0.0",
40 "Pylons==1.0.0",
41 "Beaker==1.6.4",
41 "Beaker==1.6.4",
42 "WebHelpers==1.3",
42 "WebHelpers==1.3",
43 "formencode==1.2.4",
43 "formencode==1.2.4",
44 "SQLAlchemy==0.7.10",
44 "SQLAlchemy==0.7.10",
45 "Mako==0.9.0",
45 "Mako==0.9.0",
46 "pygments>=1.5",
46 "pygments>=1.5",
47 "whoosh>=2.4.0,<2.5",
47 "whoosh>=2.4.0,<2.5",
48 "celery>=2.2.5,<2.3",
48 "celery>=2.2.5,<2.3",
49 "babel==0.9.6",
49 "babel==0.9.6",
50 "python-dateutil>=1.5.0,<2.0.0",
50 "python-dateutil>=1.5.0,<2.0.0",
51 "dulwich==0.9.3",
51 "dulwich==0.9.3",
52 "markdown==2.2.1",
52 "markdown==2.2.1",
53 "docutils==0.8.1",
53 "docutils==0.8.1",
54 "simplejson==2.5.2",
54 "simplejson==2.5.2",
55 "mock",
55 "mock",
56 "pycrypto==2.6.0",
56 "pycrypto==2.6.0",
57 "URLObject==2.3.4",
57 "URLObject==2.3.4",
58 "Routes==1.13",
58 "Routes==1.13",
59 ]
59 ]
60
60
61 if sys.version_info < (2, 6):
61 if sys.version_info < (2, 6):
62 requirements.append("pysqlite")
62 requirements.append("pysqlite")
63
63
64 if sys.version_info < (2, 7):
64 if sys.version_info < (2, 7):
65 requirements.append("importlib==1.0.1")
65 requirements.append("importlib==1.0.1")
66 requirements.append("unittest2")
66 requirements.append("unittest2")
67 requirements.append("argparse")
67 requirements.append("argparse")
68
68
69 if is_windows:
69 if is_windows:
70 requirements.append("mercurial==2.8.2")
70 requirements.append("mercurial==2.8.2")
71 else:
71 else:
72 requirements.append("py-bcrypt==0.3.0")
72 requirements.append("py-bcrypt==0.3.0")
73 requirements.append("mercurial==2.8.2")
73 requirements.append("mercurial==2.8.2")
74
74
75
75
76 dependency_links = [
76 dependency_links = [
77 ]
77 ]
78
78
79 classifiers = [
79 classifiers = [
80 'Development Status :: 4 - Beta'
80 'Development Status :: 4 - Beta',
81 'Environment :: Web Environment',
81 'Environment :: Web Environment',
82 'Framework :: Pylons',
82 'Framework :: Pylons',
83 'Intended Audience :: Developers',
83 'Intended Audience :: Developers',
84 'License :: OSI Approved :: GNU General Public License (GPL)',
84 'License :: OSI Approved :: GNU General Public License (GPL)',
85 'Operating System :: OS Independent',
85 'Operating System :: OS Independent',
86 'Programming Language :: Python',
86 'Programming Language :: Python',
87 'Programming Language :: Python :: 2.5',
87 'Programming Language :: Python :: 2.5',
88 'Programming Language :: Python :: 2.6',
88 'Programming Language :: Python :: 2.6',
89 'Programming Language :: Python :: 2.7',
89 'Programming Language :: Python :: 2.7',
90 'Topic :: Software Development :: Version Control',
90 ]
91 ]
91
92
92
93
93 # additional files from project that goes somewhere in the filesystem
94 # additional files from project that goes somewhere in the filesystem
94 # relative to sys.prefix
95 # relative to sys.prefix
95 data_files = []
96 data_files = []
96
97
97 # additional files that goes into package itself
98 # additional files that goes into package itself
98 package_data = {'kallithea': ['i18n/*/LC_MESSAGES/*.mo', ], }
99 package_data = {'kallithea': ['i18n/*/LC_MESSAGES/*.mo', ], }
99
100
100 description = ('Kallithea is a fast and powerful management tool '
101 description = ('Kallithea is a fast and powerful management tool '
101 'for Mercurial and GIT with a built in push/pull server, '
102 'for Mercurial and GIT with a built in push/pull server, '
102 'full text search and code-review.')
103 'full text search and code-review.')
103
104
104 keywords = ' '.join([
105 keywords = ' '.join([
105 'kallithea', 'mercurial', 'git', 'code review',
106 'kallithea', 'mercurial', 'git', 'code review',
106 'repo groups', 'ldap', 'repository management', 'hgweb replacement',
107 'repo groups', 'ldap', 'repository management', 'hgweb replacement',
107 'hgwebdir', 'gitweb replacement', 'serving hgweb',
108 'hgwebdir', 'gitweb replacement', 'serving hgweb',
108 ])
109 ])
109
110
110 # long description
111 # long description
111 README_FILE = 'README.rst'
112 README_FILE = 'README.rst'
112 CHANGELOG_FILE = 'docs/changelog.rst'
113 CHANGELOG_FILE = 'docs/changelog.rst'
113 try:
114 try:
114 long_description = open(README_FILE).read() + '\n\n' + \
115 long_description = open(README_FILE).read() + '\n\n' + \
115 open(CHANGELOG_FILE).read()
116 open(CHANGELOG_FILE).read()
116
117
117 except IOError, err:
118 except IOError, err:
118 sys.stderr.write(
119 sys.stderr.write(
119 "[WARNING] Cannot find file specified as long_description (%s)\n or "
120 "[WARNING] Cannot find file specified as long_description (%s)\n or "
120 "changelog (%s) skipping that file" % (README_FILE, CHANGELOG_FILE)
121 "changelog (%s) skipping that file" % (README_FILE, CHANGELOG_FILE)
121 )
122 )
122 long_description = description
123 long_description = description
123
124
124 try:
125 try:
125 from setuptools import setup, find_packages
126 from setuptools import setup, find_packages
126 except ImportError:
127 except ImportError:
127 from ez_setup import use_setuptools
128 from ez_setup import use_setuptools
128 use_setuptools()
129 use_setuptools()
129 from setuptools import setup, find_packages
130 from setuptools import setup, find_packages
130 # packages
131 # packages
131 packages = find_packages(exclude=['ez_setup'])
132 packages = find_packages(exclude=['ez_setup'])
132
133
133 setup(
134 setup(
134 name='Kallithea',
135 name='Kallithea',
135 version=__version__,
136 version=__version__,
136 description=description,
137 description=description,
137 long_description=long_description,
138 long_description=long_description,
138 keywords=keywords,
139 keywords=keywords,
139 license=__license__,
140 license=__license__,
140 author=__author__,
141 author=__author__,
141 author_email='kallithea@sfconservancy.org',
142 author_email='kallithea@sfconservancy.org',
142 dependency_links=dependency_links,
143 dependency_links=dependency_links,
143 url=__url__,
144 url=__url__,
144 install_requires=requirements,
145 install_requires=requirements,
145 classifiers=classifiers,
146 classifiers=classifiers,
146 setup_requires=["PasteScript>=1.6.3"],
147 setup_requires=["PasteScript>=1.6.3"],
147 data_files=data_files,
148 data_files=data_files,
148 packages=packages,
149 packages=packages,
149 include_package_data=True,
150 include_package_data=True,
150 test_suite='nose.collector',
151 test_suite='nose.collector',
151 package_data=package_data,
152 package_data=package_data,
152 message_extractors={'kallithea': [
153 message_extractors={'kallithea': [
153 ('**.py', 'python', None),
154 ('**.py', 'python', None),
154 ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}),
155 ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}),
155 ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}),
156 ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}),
156 ('public/**', 'ignore', None)]},
157 ('public/**', 'ignore', None)]},
157 zip_safe=False,
158 zip_safe=False,
158 paster_plugins=['PasteScript', 'Pylons'],
159 paster_plugins=['PasteScript', 'Pylons'],
159 entry_points="""
160 entry_points="""
160 [console_scripts]
161 [console_scripts]
161 kallithea-api = kallithea.bin.kallithea_api:main
162 kallithea-api = kallithea.bin.kallithea_api:main
162 kallithea-gist = kallithea.bin.kallithea_gist:main
163 kallithea-gist = kallithea.bin.kallithea_gist:main
163 kallithea-config = kallithea.bin.kallithea_config:main
164 kallithea-config = kallithea.bin.kallithea_config:main
164
165
165 [paste.app_factory]
166 [paste.app_factory]
166 main = kallithea.config.middleware:make_app
167 main = kallithea.config.middleware:make_app
167
168
168 [paste.app_install]
169 [paste.app_install]
169 main = pylons.util:PylonsInstaller
170 main = pylons.util:PylonsInstaller
170
171
171 [paste.global_paster_command]
172 [paste.global_paster_command]
172 setup-db=kallithea.lib.paster_commands.setup_db:Command
173 setup-db=kallithea.lib.paster_commands.setup_db:Command
173 update-repoinfo=kallithea.lib.paster_commands.update_repoinfo:Command
174 update-repoinfo=kallithea.lib.paster_commands.update_repoinfo:Command
174 make-rcext=kallithea.lib.paster_commands.make_rcextensions:Command
175 make-rcext=kallithea.lib.paster_commands.make_rcextensions:Command
175 repo-scan=kallithea.lib.paster_commands.repo_scan:Command
176 repo-scan=kallithea.lib.paster_commands.repo_scan:Command
176 cache-keys=kallithea.lib.paster_commands.cache_keys:Command
177 cache-keys=kallithea.lib.paster_commands.cache_keys:Command
177 ishell=kallithea.lib.paster_commands.ishell:Command
178 ishell=kallithea.lib.paster_commands.ishell:Command
178 make-index=kallithea.lib.paster_commands.make_index:Command
179 make-index=kallithea.lib.paster_commands.make_index:Command
179 upgrade-db=kallithea.lib.dbmigrate:UpgradeDb
180 upgrade-db=kallithea.lib.dbmigrate:UpgradeDb
180 celeryd=kallithea.lib.celerypylons.commands:CeleryDaemonCommand
181 celeryd=kallithea.lib.celerypylons.commands:CeleryDaemonCommand
181 """,
182 """,
182 )
183 )
General Comments 0
You need to be logged in to leave comments. Login now