##// END OF EJS Templates
packages: normalize package emails.
marcink -
r2952:9e092ab1 default
parent child Browse files
Show More
@@ -1,189 +1,189 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2
2
3 # Copyright (C) 2010-2018 RhodeCode GmbH
3 # Copyright (C) 2010-2018 RhodeCode GmbH
4 #
4 #
5 # This program is free software: you can redistribute it and/or modify
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License, version 3
6 # it under the terms of the GNU Affero General Public License, version 3
7 # (only), as published by the Free Software Foundation.
7 # (only), as published by the Free Software Foundation.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU Affero General Public License
14 # You should have received a copy of the GNU Affero General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 #
16 #
17 # This program is dual-licensed. If you wish to learn more about the
17 # This program is dual-licensed. If you wish to learn more about the
18 # RhodeCode Enterprise Edition, including its added features, Support services,
18 # RhodeCode Enterprise Edition, including its added features, Support services,
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
20
20
21 # Import early to make sure things are patched up properly
21 # Import early to make sure things are patched up properly
22 from setuptools import setup, find_packages
22 from setuptools import setup, find_packages
23
23
24 import os
24 import os
25 import sys
25 import sys
26 import pkgutil
26 import pkgutil
27 import platform
27 import platform
28 import codecs
28 import codecs
29
29
30 try: # for pip >= 10
30 try: # for pip >= 10
31 from pip._internal.req import parse_requirements
31 from pip._internal.req import parse_requirements
32 except ImportError: # for pip <= 9.0.3
32 except ImportError: # for pip <= 9.0.3
33 from pip.req import parse_requirements
33 from pip.req import parse_requirements
34
34
35 try: # for pip >= 10
35 try: # for pip >= 10
36 from pip._internal.download import PipSession
36 from pip._internal.download import PipSession
37 except ImportError: # for pip <= 9.0.3
37 except ImportError: # for pip <= 9.0.3
38 from pip.download import PipSession
38 from pip.download import PipSession
39
39
40
40
41 if sys.version_info < (2, 7):
41 if sys.version_info < (2, 7):
42 raise Exception('RhodeCode requires Python 2.7 or later')
42 raise Exception('RhodeCode requires Python 2.7 or later')
43
43
44 here = os.path.abspath(os.path.dirname(__file__))
44 here = os.path.abspath(os.path.dirname(__file__))
45
45
46 # defines current platform
46 # defines current platform
47 __platform__ = platform.system()
47 __platform__ = platform.system()
48 __license__ = 'AGPLv3, and Commercial License'
48 __license__ = 'AGPLv3, and Commercial License'
49 __author__ = 'RhodeCode GmbH'
49 __author__ = 'RhodeCode GmbH'
50 __url__ = 'https://code.rhodecode.com'
50 __url__ = 'https://code.rhodecode.com'
51 is_windows = __platform__ in ('Windows',)
51 is_windows = __platform__ in ('Windows',)
52
52
53
53
54 def _get_requirements(req_filename, exclude=None, extras=None):
54 def _get_requirements(req_filename, exclude=None, extras=None):
55 extras = extras or []
55 extras = extras or []
56 exclude = exclude or []
56 exclude = exclude or []
57
57
58 try:
58 try:
59 parsed = parse_requirements(
59 parsed = parse_requirements(
60 os.path.join(here, req_filename), session=PipSession())
60 os.path.join(here, req_filename), session=PipSession())
61 except TypeError:
61 except TypeError:
62 # try pip < 6.0.0, that doesn't support session
62 # try pip < 6.0.0, that doesn't support session
63 parsed = parse_requirements(os.path.join(here, req_filename))
63 parsed = parse_requirements(os.path.join(here, req_filename))
64
64
65 requirements = []
65 requirements = []
66 for ir in parsed:
66 for ir in parsed:
67 if ir.req and ir.name not in exclude:
67 if ir.req and ir.name not in exclude:
68 requirements.append(str(ir.req))
68 requirements.append(str(ir.req))
69 return requirements + extras
69 return requirements + extras
70
70
71
71
72 # requirements extract
72 # requirements extract
73 setup_requirements = ['PasteScript', 'pytest-runner']
73 setup_requirements = ['PasteScript', 'pytest-runner']
74 install_requirements = _get_requirements(
74 install_requirements = _get_requirements(
75 'requirements.txt', exclude=['setuptools', 'entrypoints'])
75 'requirements.txt', exclude=['setuptools', 'entrypoints'])
76 test_requirements = _get_requirements(
76 test_requirements = _get_requirements(
77 'requirements_test.txt', extras=['configobj'])
77 'requirements_test.txt', extras=['configobj'])
78
78
79
79
80 def get_version():
80 def get_version():
81 version = pkgutil.get_data('rhodecode', 'VERSION')
81 version = pkgutil.get_data('rhodecode', 'VERSION')
82 return version.strip()
82 return version.strip()
83
83
84
84
85 # additional files that goes into package itself
85 # additional files that goes into package itself
86 package_data = {
86 package_data = {
87 '': ['*.txt', '*.rst'],
87 '': ['*.txt', '*.rst'],
88 'configs': ['*.ini'],
88 'configs': ['*.ini'],
89 'rhodecode': ['VERSION', 'i18n/*/LC_MESSAGES/*.mo', ],
89 'rhodecode': ['VERSION', 'i18n/*/LC_MESSAGES/*.mo', ],
90 }
90 }
91
91
92 description = 'Source Code Management Platform'
92 description = 'Source Code Management Platform'
93 keywords = ' '.join([
93 keywords = ' '.join([
94 'rhodecode', 'mercurial', 'git', 'svn',
94 'rhodecode', 'mercurial', 'git', 'svn',
95 'code review',
95 'code review',
96 'repo groups', 'ldap', 'repository management', 'hgweb',
96 'repo groups', 'ldap', 'repository management', 'hgweb',
97 'hgwebdir', 'gitweb', 'serving hgweb',
97 'hgwebdir', 'gitweb', 'serving hgweb',
98 ])
98 ])
99
99
100
100
101 # README/DESCRIPTION generation
101 # README/DESCRIPTION generation
102 readme_file = 'README.rst'
102 readme_file = 'README.rst'
103 changelog_file = 'CHANGES.rst'
103 changelog_file = 'CHANGES.rst'
104 try:
104 try:
105 long_description = codecs.open(readme_file).read() + '\n\n' + \
105 long_description = codecs.open(readme_file).read() + '\n\n' + \
106 codecs.open(changelog_file).read()
106 codecs.open(changelog_file).read()
107 except IOError as err:
107 except IOError as err:
108 sys.stderr.write(
108 sys.stderr.write(
109 "[WARNING] Cannot find file specified as long_description (%s)\n "
109 "[WARNING] Cannot find file specified as long_description (%s)\n "
110 "or changelog (%s) skipping that file" % (readme_file, changelog_file))
110 "or changelog (%s) skipping that file" % (readme_file, changelog_file))
111 long_description = description
111 long_description = description
112
112
113
113
114 setup(
114 setup(
115 name='rhodecode-enterprise-ce',
115 name='rhodecode-enterprise-ce',
116 version=get_version(),
116 version=get_version(),
117 description=description,
117 description=description,
118 long_description=long_description,
118 long_description=long_description,
119 keywords=keywords,
119 keywords=keywords,
120 license=__license__,
120 license=__license__,
121 author=__author__,
121 author=__author__,
122 author_email='marcin@rhodecode.com',
122 author_email='support@rhodecode.com',
123 url=__url__,
123 url=__url__,
124 setup_requires=setup_requirements,
124 setup_requires=setup_requirements,
125 install_requires=install_requirements,
125 install_requires=install_requirements,
126 tests_require=test_requirements,
126 tests_require=test_requirements,
127 zip_safe=False,
127 zip_safe=False,
128 packages=find_packages(exclude=["docs", "tests*"]),
128 packages=find_packages(exclude=["docs", "tests*"]),
129 package_data=package_data,
129 package_data=package_data,
130 include_package_data=True,
130 include_package_data=True,
131 classifiers=[
131 classifiers=[
132 'Development Status :: 6 - Mature',
132 'Development Status :: 6 - Mature',
133 'Environment :: Web Environment',
133 'Environment :: Web Environment',
134 'Intended Audience :: Developers',
134 'Intended Audience :: Developers',
135 'Operating System :: OS Independent',
135 'Operating System :: OS Independent',
136 'Topic :: Software Development :: Version Control',
136 'Topic :: Software Development :: Version Control',
137 'License :: OSI Approved :: Affero GNU General Public License v3 or later (AGPLv3+)',
137 'License :: OSI Approved :: Affero GNU General Public License v3 or later (AGPLv3+)',
138 'Programming Language :: Python :: 2.7',
138 'Programming Language :: Python :: 2.7',
139 ],
139 ],
140 message_extractors={
140 message_extractors={
141 'rhodecode': [
141 'rhodecode': [
142 ('**.py', 'python', None),
142 ('**.py', 'python', None),
143 ('**.js', 'javascript', None),
143 ('**.js', 'javascript', None),
144 ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}),
144 ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}),
145 ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}),
145 ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}),
146 ('public/**', 'ignore', None),
146 ('public/**', 'ignore', None),
147 ]
147 ]
148 },
148 },
149 paster_plugins=['PasteScript'],
149 paster_plugins=['PasteScript'],
150 entry_points={
150 entry_points={
151 'enterprise.plugins1': [
151 'enterprise.plugins1': [
152 'crowd=rhodecode.authentication.plugins.auth_crowd:plugin_factory',
152 'crowd=rhodecode.authentication.plugins.auth_crowd:plugin_factory',
153 'headers=rhodecode.authentication.plugins.auth_headers:plugin_factory',
153 'headers=rhodecode.authentication.plugins.auth_headers:plugin_factory',
154 'jasig_cas=rhodecode.authentication.plugins.auth_jasig_cas:plugin_factory',
154 'jasig_cas=rhodecode.authentication.plugins.auth_jasig_cas:plugin_factory',
155 'ldap=rhodecode.authentication.plugins.auth_ldap:plugin_factory',
155 'ldap=rhodecode.authentication.plugins.auth_ldap:plugin_factory',
156 'pam=rhodecode.authentication.plugins.auth_pam:plugin_factory',
156 'pam=rhodecode.authentication.plugins.auth_pam:plugin_factory',
157 'rhodecode=rhodecode.authentication.plugins.auth_rhodecode:plugin_factory',
157 'rhodecode=rhodecode.authentication.plugins.auth_rhodecode:plugin_factory',
158 'token=rhodecode.authentication.plugins.auth_token:plugin_factory',
158 'token=rhodecode.authentication.plugins.auth_token:plugin_factory',
159 ],
159 ],
160 'paste.app_factory': [
160 'paste.app_factory': [
161 'main=rhodecode.config.middleware:make_pyramid_app',
161 'main=rhodecode.config.middleware:make_pyramid_app',
162 ],
162 ],
163 'paste.global_paster_command': [
163 'paste.global_paster_command': [
164 'ishell=rhodecode.lib.paster_commands.ishell:Command',
164 'ishell=rhodecode.lib.paster_commands.ishell:Command',
165 'upgrade-db=rhodecode.lib.paster_commands.upgrade_db:UpgradeDb',
165 'upgrade-db=rhodecode.lib.paster_commands.upgrade_db:UpgradeDb',
166
166
167 'setup-rhodecode=rhodecode.lib.paster_commands.deprecated.setup_rhodecode:Command',
167 'setup-rhodecode=rhodecode.lib.paster_commands.deprecated.setup_rhodecode:Command',
168 'celeryd=rhodecode.lib.paster_commands.deprecated.celeryd:Command',
168 'celeryd=rhodecode.lib.paster_commands.deprecated.celeryd:Command',
169 ],
169 ],
170 'pyramid.pshell_runner': [
170 'pyramid.pshell_runner': [
171 'ipython = rhodecode.lib.pyramid_shell:ipython_shell_runner',
171 'ipython = rhodecode.lib.pyramid_shell:ipython_shell_runner',
172 ],
172 ],
173 'pytest11': [
173 'pytest11': [
174 'pylons=rhodecode.tests.pylons_plugin',
174 'pylons=rhodecode.tests.pylons_plugin',
175 'enterprise=rhodecode.tests.plugin',
175 'enterprise=rhodecode.tests.plugin',
176 ],
176 ],
177 'console_scripts': [
177 'console_scripts': [
178 'rc-server=rhodecode.rcserver:main',
178 'rc-server=rhodecode.rcserver:main',
179 'rc-setup-app=rhodecode.lib.rc_commands.setup_rc:main',
179 'rc-setup-app=rhodecode.lib.rc_commands.setup_rc:main',
180 'rc-upgrade-db=rhodecode.lib.rc_commands.upgrade_db:main',
180 'rc-upgrade-db=rhodecode.lib.rc_commands.upgrade_db:main',
181 'rc-ishell=rhodecode.lib.rc_commands.ishell:main',
181 'rc-ishell=rhodecode.lib.rc_commands.ishell:main',
182 'rc-ssh-wrapper=rhodecode.apps.ssh_support.lib.ssh_wrapper:main',
182 'rc-ssh-wrapper=rhodecode.apps.ssh_support.lib.ssh_wrapper:main',
183 ],
183 ],
184 'beaker.backends': [
184 'beaker.backends': [
185 'memorylru_base=rhodecode.lib.memory_lru_dict:MemoryLRUNamespaceManagerBase',
185 'memorylru_base=rhodecode.lib.memory_lru_dict:MemoryLRUNamespaceManagerBase',
186 'memorylru_debug=rhodecode.lib.memory_lru_dict:MemoryLRUNamespaceManagerDebug'
186 'memorylru_debug=rhodecode.lib.memory_lru_dict:MemoryLRUNamespaceManagerDebug'
187 ]
187 ]
188 },
188 },
189 )
189 )
General Comments 0
You need to be logged in to leave comments. Login now