##// END OF EJS Templates
packages: normalize package emails.
marcink -
r503:d7b4a841 default
parent child Browse files
Show More
@@ -1,139 +1,139 b''
1 1 # -*- coding: utf-8 -*-
2 2 # RhodeCode VCSServer provides access to different vcs backends via network.
3 3 # Copyright (C) 2014-2017 RodeCode GmbH
4 4 #
5 5 # This program is free software; you can redistribute it and/or modify
6 6 # it under the terms of the GNU General Public License as published by
7 7 # the Free Software Foundation; either version 3 of the License, or
8 8 # (at your option) any later version.
9 9 #
10 10 # This program is distributed in the hope that it will be useful,
11 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 13 # GNU General Public License for more details.
14 14 #
15 15 # You should have received a copy of the GNU General Public License
16 16 # along with this program; if not, write to the Free Software Foundation,
17 17 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 18
19 19 # Import early to make sure things are patched up properly
20 20 from setuptools import setup, find_packages
21 21
22 22 import os
23 23 import sys
24 24 import pkgutil
25 25 import platform
26 26 import codecs
27 27
28 28 try: # for pip >= 10
29 29 from pip._internal.req import parse_requirements
30 30 except ImportError: # for pip <= 9.0.3
31 31 from pip.req import parse_requirements
32 32
33 33 try: # for pip >= 10
34 34 from pip._internal.download import PipSession
35 35 except ImportError: # for pip <= 9.0.3
36 36 from pip.download import PipSession
37 37
38 38
39 39
40 40 if sys.version_info < (2, 7):
41 41 raise Exception('VCSServer requires Python 2.7 or later')
42 42
43 43 here = os.path.abspath(os.path.dirname(__file__))
44 44
45 45 # defines current platform
46 46 __platform__ = platform.system()
47 47 __license__ = 'GPL V3'
48 48 __author__ = 'RhodeCode GmbH'
49 49 __url__ = 'https://code.rhodecode.com'
50 50 is_windows = __platform__ in ('Windows',)
51 51
52 52
53 53 def _get_requirements(req_filename, exclude=None, extras=None):
54 54 extras = extras or []
55 55 exclude = exclude or []
56 56
57 57 try:
58 58 parsed = parse_requirements(
59 59 os.path.join(here, req_filename), session=PipSession())
60 60 except TypeError:
61 61 # try pip < 6.0.0, that doesn't support session
62 62 parsed = parse_requirements(os.path.join(here, req_filename))
63 63
64 64 requirements = []
65 65 for ir in parsed:
66 66 if ir.req and ir.name not in exclude:
67 67 requirements.append(str(ir.req))
68 68 return requirements + extras
69 69
70 70
71 71 # requirements extract
72 72 setup_requirements = ['pytest-runner']
73 73 install_requirements = _get_requirements(
74 74 'requirements.txt', exclude=['setuptools'])
75 75 test_requirements = _get_requirements(
76 76 'requirements_test.txt', extras=['configobj'])
77 77
78 78
79 79 def get_version():
80 80 version = pkgutil.get_data('vcsserver', 'VERSION')
81 81 return version.strip()
82 82
83 83
84 84 # additional files that goes into package itself
85 85 package_data = {
86 86 '': ['*.txt', '*.rst'],
87 87 'configs': ['*.ini'],
88 88 'vcsserver': ['VERSION'],
89 89 }
90 90
91 91 description = 'Version Control System Server'
92 92 keywords = ' '.join([
93 93 'CLI', 'RhodeCode', 'RhodeCode Enterprise', 'RhodeCode Tools'])
94 94
95 95 # README/DESCRIPTION generation
96 96 readme_file = 'README.rst'
97 97 changelog_file = 'CHANGES.rst'
98 98 try:
99 99 long_description = codecs.open(readme_file).read() + '\n\n' + \
100 100 codecs.open(changelog_file).read()
101 101 except IOError as err:
102 102 sys.stderr.write(
103 103 "[WARNING] Cannot find file specified as long_description (%s)\n "
104 104 "or changelog (%s) skipping that file" % (readme_file, changelog_file))
105 105 long_description = description
106 106
107 107
108 108 setup(
109 109 name='rhodecode-vcsserver',
110 110 version=get_version(),
111 111 description=description,
112 112 long_description=long_description,
113 113 keywords=keywords,
114 114 license=__license__,
115 115 author=__author__,
116 author_email='marcin@rhodecode.com',
116 author_email='admin@rhodecode.com',
117 117 url=__url__,
118 118 setup_requires=setup_requirements,
119 119 install_requires=install_requirements,
120 120 tests_require=test_requirements,
121 121 zip_safe=False,
122 122 packages=find_packages(exclude=["docs", "tests*"]),
123 123 package_data=package_data,
124 124 include_package_data=True,
125 125 classifiers=[
126 126 'Development Status :: 6 - Mature',
127 127 'Intended Audience :: Developers',
128 128 'Operating System :: OS Independent',
129 129 'Topic :: Software Development :: Version Control',
130 130 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
131 131 'Programming Language :: Python :: 2.7',
132 132 ],
133 133 entry_points={
134 134 'console_scripts': [
135 135 'vcsserver=vcsserver.main:main',
136 136 ],
137 137 'paste.app_factory': ['main=vcsserver.http_main:main']
138 138 },
139 139 )
General Comments 0
You need to be logged in to leave comments. Login now