##// END OF EJS Templates
gists: handle 500 error on sending unsupported format
gists: handle 500 error on sending unsupported format

File last commit:

r3363:f08e98b1 default
r3538:e456c2e1 default
Show More
setup.py
179 lines | 6.0 KiB | text/x-python | PythonLexer
project: added all source files and assets
r1 # -*- coding: utf-8 -*-
docs: updated copyrights to 2019
r3363 # Copyright (C) 2010-2019 RhodeCode GmbH
packaging: restructured setup.py file....
r1234 #
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
# (only), as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# This program is dual-licensed. If you wish to learn more about the
# RhodeCode Enterprise Edition, including its added features, Support services,
# and proprietary license terms, please see https://rhodecode.com/licenses/
project: added all source files and assets
r1 # Import early to make sure things are patched up properly
from setuptools import setup, find_packages
import os
import sys
packaging: restructured setup.py file....
r1234 import pkgutil
project: added all source files and assets
r1 import platform
setup: use pip10 compatible setup code.
r2912 import codecs
project: added all source files and assets
r1
setup: use pip10 compatible setup code.
r2912 try: # for pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # for pip <= 9.0.3
from pip.req import parse_requirements
dependencies: organized test requirements....
r1222
setup: use pip10 compatible setup code.
r2912 try: # for pip >= 10
from pip._internal.download import PipSession
except ImportError: # for pip <= 9.0.3
from pip.download import PipSession
packaging: restructured setup.py file....
r1234
dependencies: organized test requirements....
r1222
project: added all source files and assets
r1 if sys.version_info < (2, 7):
raise Exception('RhodeCode requires Python 2.7 or later')
dependencies: organized test requirements....
r1222 here = os.path.abspath(os.path.dirname(__file__))
project: added all source files and assets
r1
packaging: restructured setup.py file....
r1234 # defines current platform
__platform__ = platform.system()
__license__ = 'AGPLv3, and Commercial License'
__author__ = 'RhodeCode GmbH'
__url__ = 'https://code.rhodecode.com'
is_windows = __platform__ in ('Windows',)
project: added all source files and assets
r1
packaging: restructured setup.py file....
r1234 def _get_requirements(req_filename, exclude=None, extras=None):
extras = extras or []
exclude = exclude or []
project: added all source files and assets
r1
packaging: restructured setup.py file....
r1234 try:
parsed = parse_requirements(
os.path.join(here, req_filename), session=PipSession())
except TypeError:
# try pip < 6.0.0, that doesn't support session
parsed = parse_requirements(os.path.join(here, req_filename))
project: added all source files and assets
r1
packaging: restructured setup.py file....
r1234 requirements = []
for ir in parsed:
if ir.req and ir.name not in exclude:
requirements.append(str(ir.req))
return requirements + extras
project: added all source files and assets
r1
packaging: restructured setup.py file....
r1234 # requirements extract
setup_requirements = ['PasteScript', 'pytest-runner']
install_requirements = _get_requirements(
pylons: remove pylons as dependency...
r2351 'requirements.txt', exclude=['setuptools', 'entrypoints'])
packaging: restructured setup.py file....
r1234 test_requirements = _get_requirements(
'requirements_test.txt', extras=['configobj'])
project: added all source files and assets
r1
packaging: restructured setup.py file....
r1234 def get_version():
version = pkgutil.get_data('rhodecode', 'VERSION')
return version.strip()
project: added all source files and assets
r1
# additional files that goes into package itself
packaging: restructured setup.py file....
r1234 package_data = {
'': ['*.txt', '*.rst'],
'configs': ['*.ini'],
'rhodecode': ['VERSION', 'i18n/*/LC_MESSAGES/*.mo', ],
}
project: added all source files and assets
r1
packaging: restructured setup.py file....
r1234 description = 'Source Code Management Platform'
project: added all source files and assets
r1 keywords = ' '.join([
packaging: restructured setup.py file....
r1234 'rhodecode', 'mercurial', 'git', 'svn',
'code review',
'repo groups', 'ldap', 'repository management', 'hgweb',
'hgwebdir', 'gitweb', 'serving hgweb',
project: added all source files and assets
r1 ])
packaging: restructured setup.py file....
r1234
# README/DESCRIPTION generation
readme_file = 'README.rst'
changelog_file = 'CHANGES.rst'
project: added all source files and assets
r1 try:
setup: use pip10 compatible setup code.
r2912 long_description = codecs.open(readme_file).read() + '\n\n' + \
codecs.open(changelog_file).read()
packaging: restructured setup.py file....
r1234 except IOError as err:
project: added all source files and assets
r1 sys.stderr.write(
packaging: restructured setup.py file....
r1234 "[WARNING] Cannot find file specified as long_description (%s)\n "
"or changelog (%s) skipping that file" % (readme_file, changelog_file))
project: added all source files and assets
r1 long_description = description
setup(
name='rhodecode-enterprise-ce',
packaging: restructured setup.py file....
r1234 version=get_version(),
project: added all source files and assets
r1 description=description,
long_description=long_description,
keywords=keywords,
license=__license__,
author=__author__,
packages: normalize package emails.
r2952 author_email='support@rhodecode.com',
project: added all source files and assets
r1 url=__url__,
packaging: restructured setup.py file....
r1234 setup_requires=setup_requirements,
install_requires=install_requirements,
project: added all source files and assets
r1 tests_require=test_requirements,
packaging: restructured setup.py file....
r1234 zip_safe=False,
packages=find_packages(exclude=["docs", "tests*"]),
package_data=package_data,
project: added all source files and assets
r1 include_package_data=True,
packaging: restructured setup.py file....
r1234 classifiers=[
'Development Status :: 6 - Mature',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Topic :: Software Development :: Version Control',
'License :: OSI Approved :: Affero GNU General Public License v3 or later (AGPLv3+)',
'Programming Language :: Python :: 2.7',
],
project: added all source files and assets
r1 message_extractors={
'rhodecode': [
('**.py', 'python', None),
i18n: added JS extractors to work with the standard extract_messages command.
r326 ('**.js', 'javascript', None),
project: added all source files and assets
r1 ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}),
('templates/**.html', 'mako', {'input_encoding': 'utf-8'}),
('public/**', 'ignore', None),
]
},
pylons: remove core components out of setup.py
r2352 paster_plugins=['PasteScript'],
project: added all source files and assets
r1 entry_points={
'paste.app_factory': [
'main=rhodecode.config.middleware:make_pyramid_app',
],
packaging: restructured setup.py file....
r1234 'paste.global_paster_command': [
'ishell=rhodecode.lib.paster_commands.ishell:Command',
paster: commands cleanup....
r2357 'upgrade-db=rhodecode.lib.paster_commands.upgrade_db:UpgradeDb',
pylons: deprecate certain pylons paster command
r2356
paster: further deprecated certain commands from paster....
r2368 'setup-rhodecode=rhodecode.lib.paster_commands.deprecated.setup_rhodecode:Command',
pylons: deprecate certain pylons paster command
r2356 'celeryd=rhodecode.lib.paster_commands.deprecated.celeryd:Command',
packaging: restructured setup.py file....
r1234 ],
core: expose pshell as ipython with RhodeCode imports....
r2006 'pyramid.pshell_runner': [
'ipython = rhodecode.lib.pyramid_shell:ipython_shell_runner',
],
project: added all source files and assets
r1 'pytest11': [
'pylons=rhodecode.tests.pylons_plugin',
'enterprise=rhodecode.tests.plugin',
],
'console_scripts': [
binaries: cleanup new upcomming rc-* commands that will replace paster * commands from pylons
r2119 'rc-setup-app=rhodecode.lib.rc_commands.setup_rc:main',
'rc-upgrade-db=rhodecode.lib.rc_commands.upgrade_db:main',
'rc-ishell=rhodecode.lib.rc_commands.ishell:main',
'rc-ssh-wrapper=rhodecode.apps.ssh_support.lib.ssh_wrapper:main',
project: added all source files and assets
r1 ],
'beaker.backends': [
caches: use repo.lru based Dict cache. This LRUDict uses Timing Algo to not have to use locking...
r2945 'memorylru_base=rhodecode.lib.memory_lru_dict:MemoryLRUNamespaceManagerBase',
'memorylru_debug=rhodecode.lib.memory_lru_dict:MemoryLRUNamespaceManagerDebug'
project: added all source files and assets
r1 ]
},
)