setup.py
178 lines
| 5.3 KiB
| text/x-python
|
PythonLexer
r4005 | # -*- coding: utf-8 -*- | |||
r2563 | import os | |||
r553 | import sys | |||
r2563 | import platform | |||
if sys.version_info < (2, 5): | ||||
raise Exception('RhodeCode requires python 2.5 or later') | ||||
here = os.path.abspath(os.path.dirname(__file__)) | ||||
def _get_meta_var(name, data, callback_handler=None): | ||||
import re | ||||
matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data) | ||||
if matches: | ||||
if not callable(callback_handler): | ||||
callback_handler = lambda v: v | ||||
return callback_handler(eval(matches.groups()[0])) | ||||
_meta = open(os.path.join(here, 'rhodecode', '__init__.py'), 'rb') | ||||
_metadata = _meta.read() | ||||
_meta.close() | ||||
callback = lambda V: ('.'.join(map(str, V[:3])) + '.'.join(V[3:])) | ||||
__version__ = _get_meta_var('VERSION', _metadata, callback) | ||||
__license__ = _get_meta_var('__license__', _metadata) | ||||
__author__ = _get_meta_var('__author__', _metadata) | ||||
__url__ = _get_meta_var('__url__', _metadata) | ||||
# defines current platform | ||||
__platform__ = platform.system() | ||||
r3892 | is_windows = __platform__ in ['Windows'] | |||
r1078 | ||||
r2563 | requirements = [ | |||
r3900 | "waitress==0.8.4", | |||
r2715 | "webob==1.0.8", | |||
r3406 | "webtest==1.4.3", | |||
r2563 | "Pylons==1.0.0", | |||
r2715 | "Beaker==1.6.4", | |||
r2563 | "WebHelpers==1.3", | |||
"formencode==1.2.4", | ||||
r3429 | "SQLAlchemy==0.7.10", | |||
r3000 | "Mako==0.7.3", | |||
r2715 | "pygments>=1.5", | |||
r2563 | "whoosh>=2.4.0,<2.5", | |||
"celery>=2.2.5,<2.3", | ||||
"babel", | ||||
"python-dateutil>=1.5.0,<2.0.0", | ||||
r3034 | "dulwich>=0.8.7,<0.9.0", | |||
r3000 | "markdown==2.2.1", | |||
r2563 | "docutils==0.8.1", | |||
"simplejson==2.5.2", | ||||
r2597 | "mock", | |||
r2563 | ] | |||
if sys.version_info < (2, 6): | ||||
requirements.append("pysqlite") | ||||
r2772 | if sys.version_info < (2, 7): | |||
r2563 | requirements.append("unittest2") | |||
r3230 | requirements.append("argparse") | |||
r2563 | ||||
if is_windows: | ||||
r3937 | requirements.append("mercurial==2.6.2") | |||
r2563 | else: | |||
requirements.append("py-bcrypt") | ||||
r3937 | requirements.append("mercurial==2.6.2") | |||
r2563 | ||||
r1163 | ||||
r1456 | dependency_links = [ | |||
] | ||||
r1966 | classifiers = [ | |||
r2031 | 'Development Status :: 5 - Production/Stable', | |||
r1966 | 'Environment :: Web Environment', | |||
'Framework :: Pylons', | ||||
'Intended Audience :: Developers', | ||||
'License :: OSI Approved :: GNU General Public License (GPL)', | ||||
'Operating System :: OS Independent', | ||||
'Programming Language :: Python', | ||||
'Programming Language :: Python :: 2.5', | ||||
'Programming Language :: Python :: 2.6', | ||||
'Programming Language :: Python :: 2.7', | ||||
] | ||||
r572 | ||||
r1118 | ||||
r1792 | # additional files from project that goes somewhere in the filesystem | |||
# relative to sys.prefix | ||||
r553 | data_files = [] | |||
r1792 | # additional files that goes into package itself | |||
r553 | package_data = {'rhodecode': ['i18n/*/LC_MESSAGES/*.mo', ], } | |||
r552 | ||||
r3305 | description = ('RhodeCode is a fast and powerful management tool ' | |||
'for Mercurial and GIT with a built in push/pull server, ' | ||||
r3310 | 'full text search and code-review.') | |||
r4005 | ||||
keywords = ' '.join([ | ||||
'rhodecode', 'rhodiumcode', 'mercurial', 'git', 'code review', | ||||
'repo groups', 'ldap', 'repository management', 'hgweb replacement', | ||||
'hgwebdir', 'gitweb replacement', 'serving hgweb', | ||||
]) | ||||
r1792 | # long description | |||
r4005 | README_FILE = 'README.rst' | |||
CHANGELOG_FILE = 'docs/changelog.rst' | ||||
r553 | try: | |||
r4005 | long_description = open(README_FILE).read() + '\n\n' + \ | |||
open(CHANGELOG_FILE).read() | ||||
r682 | ||||
r553 | except IOError, err: | |||
r4005 | sys.stderr.write( | |||
"[WARNING] Cannot find file specified as long_description (%s)\n or " | ||||
"changelog (%s) skipping that file" % (README_FILE, CHANGELOG_FILE) | ||||
) | ||||
r565 | long_description = description | |||
r552 | ||||
Marcin Kuzminski
|
r0 | try: | ||
from setuptools import setup, find_packages | ||||
except ImportError: | ||||
from ez_setup import use_setuptools | ||||
use_setuptools() | ||||
from setuptools import setup, find_packages | ||||
r1792 | # packages | |||
r553 | packages = find_packages(exclude=['ez_setup']) | |||
Marcin Kuzminski
|
r0 | |||
setup( | ||||
r552 | name='RhodeCode', | |||
r2563 | version=__version__, | |||
r565 | description=description, | |||
r552 | long_description=long_description, | |||
r1078 | keywords=keywords, | |||
r1205 | license=__license__, | |||
r2563 | author=__author__, | |||
r244 | author_email='marcin@python-works.com', | |||
r1456 | dependency_links=dependency_links, | |||
r2563 | url=__url__, | |||
r552 | install_requires=requirements, | |||
r572 | classifiers=classifiers, | |||
r127 | setup_requires=["PasteScript>=1.6.3"], | |||
r552 | data_files=data_files, | |||
r553 | packages=packages, | |||
r127 | include_package_data=True, | |||
test_suite='nose.collector', | ||||
r553 | package_data=package_data, | |||
r547 | message_extractors={'rhodecode': [ | |||
Marcin Kuzminski
|
r0 | ('**.py', 'python', None), | ||
('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}), | ||||
r1143 | ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}), | |||
Marcin Kuzminski
|
r0 | ('public/**', 'ignore', None)]}, | ||
r127 | zip_safe=False, | |||
paster_plugins=['PasteScript', 'Pylons'], | ||||
entry_points=""" | ||||
r2379 | [console_scripts] | |||
rhodecode-api = rhodecode.bin.rhodecode_api:main | ||||
r3840 | rhodecode-gist = rhodecode.bin.rhodecode_gist:main | |||
r2379 | ||||
Marcin Kuzminski
|
r0 | [paste.app_factory] | ||
r547 | main = rhodecode.config.middleware:make_app | |||
Marcin Kuzminski
|
r0 | |||
[paste.app_install] | ||||
main = pylons.util:PylonsInstaller | ||||
r683 | ||||
[paste.global_paster_command] | ||||
r3340 | setup-rhodecode=rhodecode.lib.paster_commands.setup_rhodecode:Command | |||
cleanup-repos=rhodecode.lib.paster_commands.cleanup:Command | ||||
update-repoinfo=rhodecode.lib.paster_commands.update_repoinfo:Command | ||||
make-rcext=rhodecode.lib.paster_commands.make_rcextensions:Command | ||||
repo-scan=rhodecode.lib.paster_commands.repo_scan:Command | ||||
r3616 | cache-keys=rhodecode.lib.paster_commands.cache_keys:Command | |||
r3663 | ishell=rhodecode.lib.paster_commands.ishell:Command | |||
r3915 | make-index=rhodecode.lib.paster_commands.make_index:Command | |||
r2105 | upgrade-db=rhodecode.lib.dbmigrate:UpgradeDb | |||
r775 | celeryd=rhodecode.lib.celerypylons.commands:CeleryDaemonCommand | |||
Marcin Kuzminski
|
r0 | """, | ||
) | ||||