##// END OF EJS Templates
nix: bumped packages version
nix: bumped packages version

File last commit:

r981:55389aab python3
r997:2326c459 dev default
Show More
setup.py
136 lines | 4.2 KiB | text/x-python | PythonLexer
setup-py: restructured the file to be in synced with other projects.
r136 # -*- coding: utf-8 -*-
initial commit
r0 # RhodeCode VCSServer provides access to different vcs backends via network.
docs: updated copyrights to 2019
r620 # Copyright (C) 2014-2019 RodeCode GmbH
initial commit
r0 #
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# 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 General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
setup-py: restructured the file to be in synced with other projects.
r136 # Import early to make sure things are patched up properly
initial commit
r0 from setuptools import setup, find_packages
setup-py: restructured the file to be in synced with other projects.
r136
import os
import sys
import pkgutil
import platform
setup: use pip10 compatible setup code.
r493 import codecs
setup-py: restructured the file to be in synced with other projects.
r136
setup: use pip10 compatible setup code.
r493 try: # for pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # for pip <= 9.0.3
from pip.req import parse_requirements
setup-py: restructured the file to be in synced with other projects.
r136
setup: use pip10 compatible setup code.
r493 try: # for pip >= 10
from pip._internal.download import PipSession
except ImportError: # for pip <= 9.0.3
from pip.download import PipSession
initial commit
r0
setup-py: restructured the file to be in synced with other projects.
r136 if sys.version_info < (2, 7):
raise Exception('VCSServer requires Python 2.7 or later')
here = os.path.abspath(os.path.dirname(__file__))
# defines current platform
__platform__ = platform.system()
__license__ = 'GPL V3'
__author__ = 'RhodeCode GmbH'
__url__ = 'https://code.rhodecode.com'
is_windows = __platform__ in ('Windows',)
def _get_requirements(req_filename, exclude=None, extras=None):
extras = extras or []
exclude = exclude or []
initial commit
r0
setup-py: restructured the file to be in synced with other projects.
r136 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))
requirements = []
for ir in parsed:
if ir.req and ir.name not in exclude:
requirements.append(str(ir.req))
return requirements + extras
# requirements extract
setup_requirements = ['pytest-runner']
install_requirements = _get_requirements(
'requirements.txt', exclude=['setuptools'])
test_requirements = _get_requirements(
'requirements_test.txt', extras=['configobj'])
initial commit
r0
def get_version():
version = pkgutil.get_data('vcsserver', 'VERSION')
return version.strip()
setup-py: restructured the file to be in synced with other projects.
r136 # additional files that goes into package itself
package_data = {
'': ['*.txt', '*.rst'],
'configs': ['*.ini'],
'vcsserver': ['VERSION'],
}
initial commit
r0
setup-py: restructured the file to be in synced with other projects.
r136 description = 'Version Control System Server'
keywords = ' '.join([
'CLI', 'RhodeCode', 'RhodeCode Enterprise', 'RhodeCode Tools'])
initial commit
r0
setup-py: restructured the file to be in synced with other projects.
r136 # README/DESCRIPTION generation
readme_file = 'README.rst'
changelog_file = 'CHANGES.rst'
try:
setup: use pip10 compatible setup code.
r493 long_description = codecs.open(readme_file).read() + '\n\n' + \
codecs.open(changelog_file).read()
setup-py: restructured the file to be in synced with other projects.
r136 except IOError as err:
sys.stderr.write(
"[WARNING] Cannot find file specified as long_description (%s)\n "
"or changelog (%s) skipping that file" % (readme_file, changelog_file))
long_description = description
initial commit
r0
setup(
name='rhodecode-vcsserver',
version=get_version(),
setup-py: restructured the file to be in synced with other projects.
r136 description=description,
initial commit
r0 long_description=long_description,
setup-py: restructured the file to be in synced with other projects.
r136 keywords=keywords,
license=__license__,
author=__author__,
packages: normalize package emails.
r503 author_email='admin@rhodecode.com',
setup-py: restructured the file to be in synced with other projects.
r136 url=__url__,
setup_requires=setup_requirements,
install_requires=install_requirements,
tests_require=test_requirements,
zip_safe=False,
packages=find_packages(exclude=["docs", "tests*"]),
package_data=package_data,
include_package_data=True,
initial commit
r0 classifiers=[
setup-py: restructured the file to be in synced with other projects.
r136 'Development Status :: 6 - Mature',
initial commit
r0 'Intended Audience :: Developers',
setup-py: restructured the file to be in synced with other projects.
r136 'Operating System :: OS Independent',
initial commit
r0 'Topic :: Software Development :: Version Control',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Programming Language :: Python :: 2.7',
],
entry_points={
'paste.app_factory': ['main=vcsserver.http_main:main']
},
)