##// END OF EJS Templates
dev-env: Remove locustio from dependencies and nix-shell
Martin Bornhold -
r479:c121f2d8 default
parent child Browse files
Show More
@@ -1,250 +1,249 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2
2
3 # Import early to make sure things are patched up properly
3 # Import early to make sure things are patched up properly
4 from setuptools import setup, find_packages
4 from setuptools import setup, find_packages
5
5
6 import os
6 import os
7 import sys
7 import sys
8 import platform
8 import platform
9
9
10 if sys.version_info < (2, 7):
10 if sys.version_info < (2, 7):
11 raise Exception('RhodeCode requires Python 2.7 or later')
11 raise Exception('RhodeCode requires Python 2.7 or later')
12
12
13
13
14 here = os.path.abspath(os.path.dirname(__file__))
14 here = os.path.abspath(os.path.dirname(__file__))
15
15
16
16
17 def _get_meta_var(name, data, callback_handler=None):
17 def _get_meta_var(name, data, callback_handler=None):
18 import re
18 import re
19 matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data)
19 matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data)
20 if matches:
20 if matches:
21 if not callable(callback_handler):
21 if not callable(callback_handler):
22 callback_handler = lambda v: v
22 callback_handler = lambda v: v
23
23
24 return callback_handler(eval(matches.groups()[0]))
24 return callback_handler(eval(matches.groups()[0]))
25
25
26 _meta = open(os.path.join(here, 'rhodecode', '__init__.py'), 'rb')
26 _meta = open(os.path.join(here, 'rhodecode', '__init__.py'), 'rb')
27 _metadata = _meta.read()
27 _metadata = _meta.read()
28 _meta.close()
28 _meta.close()
29
29
30 callback = lambda V: ('.'.join(map(str, V[:3])) + '.'.join(V[3:]))
30 callback = lambda V: ('.'.join(map(str, V[:3])) + '.'.join(V[3:]))
31 __version__ = open(os.path.join('rhodecode', 'VERSION')).read().strip()
31 __version__ = open(os.path.join('rhodecode', 'VERSION')).read().strip()
32 __license__ = _get_meta_var('__license__', _metadata)
32 __license__ = _get_meta_var('__license__', _metadata)
33 __author__ = _get_meta_var('__author__', _metadata)
33 __author__ = _get_meta_var('__author__', _metadata)
34 __url__ = _get_meta_var('__url__', _metadata)
34 __url__ = _get_meta_var('__url__', _metadata)
35 # defines current platform
35 # defines current platform
36 __platform__ = platform.system()
36 __platform__ = platform.system()
37
37
38 # Cygwin has different platform identifiers, but they all contain the
38 # Cygwin has different platform identifiers, but they all contain the
39 # term "CYGWIN"
39 # term "CYGWIN"
40 is_windows = __platform__ == 'Windows' or 'CYGWIN' in __platform__
40 is_windows = __platform__ == 'Windows' or 'CYGWIN' in __platform__
41
41
42 requirements = [
42 requirements = [
43 'Babel',
43 'Babel',
44 'Beaker',
44 'Beaker',
45 'FormEncode',
45 'FormEncode',
46 'Mako',
46 'Mako',
47 'Markdown',
47 'Markdown',
48 'MarkupSafe',
48 'MarkupSafe',
49 'MySQL-python',
49 'MySQL-python',
50 'Paste',
50 'Paste',
51 'PasteDeploy',
51 'PasteDeploy',
52 'PasteScript',
52 'PasteScript',
53 'Pygments',
53 'Pygments',
54 'Pylons',
54 'Pylons',
55 'Pyro4',
55 'Pyro4',
56 'Routes',
56 'Routes',
57 'SQLAlchemy',
57 'SQLAlchemy',
58 'Tempita',
58 'Tempita',
59 'URLObject',
59 'URLObject',
60 'WebError',
60 'WebError',
61 'WebHelpers',
61 'WebHelpers',
62 'WebHelpers2',
62 'WebHelpers2',
63 'WebOb',
63 'WebOb',
64 'WebTest',
64 'WebTest',
65 'Whoosh',
65 'Whoosh',
66 'alembic',
66 'alembic',
67 'amqplib',
67 'amqplib',
68 'anyjson',
68 'anyjson',
69 'appenlight-client',
69 'appenlight-client',
70 'authomatic',
70 'authomatic',
71 'backport_ipaddress',
71 'backport_ipaddress',
72 'celery',
72 'celery',
73 'colander',
73 'colander',
74 'decorator',
74 'decorator',
75 'docutils',
75 'docutils',
76 'gunicorn',
76 'gunicorn',
77 'infrae.cache',
77 'infrae.cache',
78 'ipython',
78 'ipython',
79 'iso8601',
79 'iso8601',
80 'kombu',
80 'kombu',
81 'msgpack-python',
81 'msgpack-python',
82 'packaging',
82 'packaging',
83 'psycopg2',
83 'psycopg2',
84 'py-gfm',
84 'py-gfm',
85 'pycrypto',
85 'pycrypto',
86 'pycurl',
86 'pycurl',
87 'pyparsing',
87 'pyparsing',
88 'pyramid',
88 'pyramid',
89 'pyramid-debugtoolbar',
89 'pyramid-debugtoolbar',
90 'pyramid-mako',
90 'pyramid-mako',
91 'pyramid-beaker',
91 'pyramid-beaker',
92 'pysqlite',
92 'pysqlite',
93 'python-dateutil',
93 'python-dateutil',
94 'python-ldap',
94 'python-ldap',
95 'python-memcached',
95 'python-memcached',
96 'python-pam',
96 'python-pam',
97 'recaptcha-client',
97 'recaptcha-client',
98 'repoze.lru',
98 'repoze.lru',
99 'requests',
99 'requests',
100 'simplejson',
100 'simplejson',
101 'waitress',
101 'waitress',
102 'zope.cachedescriptors',
102 'zope.cachedescriptors',
103 'dogpile.cache',
103 'dogpile.cache',
104 'dogpile.core'
104 'dogpile.core'
105 ]
105 ]
106
106
107 if is_windows:
107 if is_windows:
108 pass
108 pass
109 else:
109 else:
110 requirements.append('psutil')
110 requirements.append('psutil')
111 requirements.append('py-bcrypt')
111 requirements.append('py-bcrypt')
112
112
113 test_requirements = [
113 test_requirements = [
114 'WebTest',
114 'WebTest',
115 'configobj',
115 'configobj',
116 'cssselect',
116 'cssselect',
117 'flake8',
117 'flake8',
118 'lxml',
118 'lxml',
119 'locustio',
120 'mock',
119 'mock',
121 'pytest',
120 'pytest',
122 'pytest-cov',
121 'pytest-cov',
123 'pytest-runner',
122 'pytest-runner',
124 ]
123 ]
125
124
126 setup_requirements = [
125 setup_requirements = [
127 'PasteScript',
126 'PasteScript',
128 'pytest-runner',
127 'pytest-runner',
129 ]
128 ]
130
129
131 dependency_links = [
130 dependency_links = [
132 ]
131 ]
133
132
134 classifiers = [
133 classifiers = [
135 'Development Status :: 6 - Mature',
134 'Development Status :: 6 - Mature',
136 'Environment :: Web Environment',
135 'Environment :: Web Environment',
137 'Framework :: Pylons',
136 'Framework :: Pylons',
138 'Intended Audience :: Developers',
137 'Intended Audience :: Developers',
139 'Operating System :: OS Independent',
138 'Operating System :: OS Independent',
140 'Programming Language :: Python',
139 'Programming Language :: Python',
141 'Programming Language :: Python :: 2.7',
140 'Programming Language :: Python :: 2.7',
142 ]
141 ]
143
142
144
143
145 # additional files from project that goes somewhere in the filesystem
144 # additional files from project that goes somewhere in the filesystem
146 # relative to sys.prefix
145 # relative to sys.prefix
147 data_files = []
146 data_files = []
148
147
149 # additional files that goes into package itself
148 # additional files that goes into package itself
150 package_data = {'rhodecode': ['i18n/*/LC_MESSAGES/*.mo', ], }
149 package_data = {'rhodecode': ['i18n/*/LC_MESSAGES/*.mo', ], }
151
150
152 description = ('RhodeCode is a fast and powerful management tool '
151 description = ('RhodeCode is a fast and powerful management tool '
153 'for Mercurial and GIT with a built in push/pull server, '
152 'for Mercurial and GIT with a built in push/pull server, '
154 'full text search and code-review.')
153 'full text search and code-review.')
155
154
156 keywords = ' '.join([
155 keywords = ' '.join([
157 'rhodecode', 'rhodiumcode', 'mercurial', 'git', 'code review',
156 'rhodecode', 'rhodiumcode', 'mercurial', 'git', 'code review',
158 'repo groups', 'ldap', 'repository management', 'hgweb replacement',
157 'repo groups', 'ldap', 'repository management', 'hgweb replacement',
159 'hgwebdir', 'gitweb replacement', 'serving hgweb',
158 'hgwebdir', 'gitweb replacement', 'serving hgweb',
160 ])
159 ])
161
160
162 # long description
161 # long description
163 README_FILE = 'README.rst'
162 README_FILE = 'README.rst'
164 CHANGELOG_FILE = 'CHANGES.rst'
163 CHANGELOG_FILE = 'CHANGES.rst'
165 try:
164 try:
166 long_description = open(README_FILE).read() + '\n\n' + \
165 long_description = open(README_FILE).read() + '\n\n' + \
167 open(CHANGELOG_FILE).read()
166 open(CHANGELOG_FILE).read()
168
167
169 except IOError, err:
168 except IOError, err:
170 sys.stderr.write(
169 sys.stderr.write(
171 '[WARNING] Cannot find file specified as long_description (%s)\n or '
170 '[WARNING] Cannot find file specified as long_description (%s)\n or '
172 'changelog (%s) skipping that file' % (README_FILE, CHANGELOG_FILE)
171 'changelog (%s) skipping that file' % (README_FILE, CHANGELOG_FILE)
173 )
172 )
174 long_description = description
173 long_description = description
175
174
176 # packages
175 # packages
177 packages = find_packages()
176 packages = find_packages()
178
177
179 paster_commands = [
178 paster_commands = [
180 'make-config=rhodecode.lib.paster_commands.make_config:Command',
179 'make-config=rhodecode.lib.paster_commands.make_config:Command',
181 'setup-rhodecode=rhodecode.lib.paster_commands.setup_rhodecode:Command',
180 'setup-rhodecode=rhodecode.lib.paster_commands.setup_rhodecode:Command',
182 'update-repoinfo=rhodecode.lib.paster_commands.update_repoinfo:Command',
181 'update-repoinfo=rhodecode.lib.paster_commands.update_repoinfo:Command',
183 'cache-keys=rhodecode.lib.paster_commands.cache_keys:Command',
182 'cache-keys=rhodecode.lib.paster_commands.cache_keys:Command',
184 'ishell=rhodecode.lib.paster_commands.ishell:Command',
183 'ishell=rhodecode.lib.paster_commands.ishell:Command',
185 'upgrade-db=rhodecode.lib.dbmigrate:UpgradeDb',
184 'upgrade-db=rhodecode.lib.dbmigrate:UpgradeDb',
186 'celeryd=rhodecode.lib.celerypylons.commands:CeleryDaemonCommand',
185 'celeryd=rhodecode.lib.celerypylons.commands:CeleryDaemonCommand',
187 ]
186 ]
188
187
189 setup(
188 setup(
190 name='rhodecode-enterprise-ce',
189 name='rhodecode-enterprise-ce',
191 version=__version__,
190 version=__version__,
192 description=description,
191 description=description,
193 long_description=long_description,
192 long_description=long_description,
194 keywords=keywords,
193 keywords=keywords,
195 license=__license__,
194 license=__license__,
196 author=__author__,
195 author=__author__,
197 author_email='marcin@rhodecode.com',
196 author_email='marcin@rhodecode.com',
198 dependency_links=dependency_links,
197 dependency_links=dependency_links,
199 url=__url__,
198 url=__url__,
200 install_requires=requirements,
199 install_requires=requirements,
201 tests_require=test_requirements,
200 tests_require=test_requirements,
202 classifiers=classifiers,
201 classifiers=classifiers,
203 setup_requires=setup_requirements,
202 setup_requires=setup_requirements,
204 data_files=data_files,
203 data_files=data_files,
205 packages=packages,
204 packages=packages,
206 include_package_data=True,
205 include_package_data=True,
207 package_data=package_data,
206 package_data=package_data,
208 message_extractors={
207 message_extractors={
209 'rhodecode': [
208 'rhodecode': [
210 ('**.py', 'python', None),
209 ('**.py', 'python', None),
211 ('**.js', 'javascript', None),
210 ('**.js', 'javascript', None),
212 ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}),
211 ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}),
213 ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}),
212 ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}),
214 ('public/**', 'ignore', None),
213 ('public/**', 'ignore', None),
215 ]
214 ]
216 },
215 },
217 zip_safe=False,
216 zip_safe=False,
218 paster_plugins=['PasteScript', 'Pylons'],
217 paster_plugins=['PasteScript', 'Pylons'],
219 entry_points={
218 entry_points={
220 'enterprise.plugins1': [
219 'enterprise.plugins1': [
221 'crowd=rhodecode.authentication.plugins.auth_crowd:plugin_factory',
220 'crowd=rhodecode.authentication.plugins.auth_crowd:plugin_factory',
222 'headers=rhodecode.authentication.plugins.auth_headers:plugin_factory',
221 'headers=rhodecode.authentication.plugins.auth_headers:plugin_factory',
223 'jasig_cas=rhodecode.authentication.plugins.auth_jasig_cas:plugin_factory',
222 'jasig_cas=rhodecode.authentication.plugins.auth_jasig_cas:plugin_factory',
224 'ldap=rhodecode.authentication.plugins.auth_ldap:plugin_factory',
223 'ldap=rhodecode.authentication.plugins.auth_ldap:plugin_factory',
225 'pam=rhodecode.authentication.plugins.auth_pam:plugin_factory',
224 'pam=rhodecode.authentication.plugins.auth_pam:plugin_factory',
226 'rhodecode=rhodecode.authentication.plugins.auth_rhodecode:plugin_factory',
225 'rhodecode=rhodecode.authentication.plugins.auth_rhodecode:plugin_factory',
227 'token=rhodecode.authentication.plugins.auth_token:plugin_factory',
226 'token=rhodecode.authentication.plugins.auth_token:plugin_factory',
228 ],
227 ],
229 'paste.app_factory': [
228 'paste.app_factory': [
230 'main=rhodecode.config.middleware:make_pyramid_app',
229 'main=rhodecode.config.middleware:make_pyramid_app',
231 'pylons=rhodecode.config.middleware:make_app',
230 'pylons=rhodecode.config.middleware:make_app',
232 ],
231 ],
233 'paste.app_install': [
232 'paste.app_install': [
234 'main=pylons.util:PylonsInstaller',
233 'main=pylons.util:PylonsInstaller',
235 'pylons=pylons.util:PylonsInstaller',
234 'pylons=pylons.util:PylonsInstaller',
236 ],
235 ],
237 'paste.global_paster_command': paster_commands,
236 'paste.global_paster_command': paster_commands,
238 'pytest11': [
237 'pytest11': [
239 'pylons=rhodecode.tests.pylons_plugin',
238 'pylons=rhodecode.tests.pylons_plugin',
240 'enterprise=rhodecode.tests.plugin',
239 'enterprise=rhodecode.tests.plugin',
241 ],
240 ],
242 'console_scripts': [
241 'console_scripts': [
243 'rcserver=rhodecode.rcserver:main',
242 'rcserver=rhodecode.rcserver:main',
244 ],
243 ],
245 'beaker.backends': [
244 'beaker.backends': [
246 'memorylru_base=rhodecode.lib.memory_lru_debug:MemoryLRUNamespaceManagerBase',
245 'memorylru_base=rhodecode.lib.memory_lru_debug:MemoryLRUNamespaceManagerBase',
247 'memorylru_debug=rhodecode.lib.memory_lru_debug:MemoryLRUNamespaceManagerDebug'
246 'memorylru_debug=rhodecode.lib.memory_lru_debug:MemoryLRUNamespaceManagerDebug'
248 ]
247 ]
249 },
248 },
250 )
249 )
@@ -1,58 +1,57 b''
1 { pkgs ? (import <nixpkgs> {})
1 { pkgs ? (import <nixpkgs> {})
2 , vcsserverPath ? "./../rhodecode-vcsserver"
2 , vcsserverPath ? "./../rhodecode-vcsserver"
3 , vcsserverNix ? "shell.nix"
3 , vcsserverNix ? "shell.nix"
4 , doCheck ? true
4 , doCheck ? true
5 }:
5 }:
6
6
7 let
7 let
8
8
9 # Convert vcsserverPath to absolute path.
9 # Convert vcsserverPath to absolute path.
10 vcsserverAbsPath =
10 vcsserverAbsPath =
11 if pkgs.lib.strings.hasPrefix "/" vcsserverPath then
11 if pkgs.lib.strings.hasPrefix "/" vcsserverPath then
12 builtins.toPath "${vcsserverPath}"
12 builtins.toPath "${vcsserverPath}"
13 else
13 else
14 builtins.toPath ("${builtins.getEnv "PWD"}/${vcsserverPath}");
14 builtins.toPath ("${builtins.getEnv "PWD"}/${vcsserverPath}");
15
15
16 # Import vcsserver if nix file exists, otherwise set it to null.
16 # Import vcsserver if nix file exists, otherwise set it to null.
17 vcsserver =
17 vcsserver =
18 let
18 let
19 nixFile = "${vcsserverAbsPath}/${vcsserverNix}";
19 nixFile = "${vcsserverAbsPath}/${vcsserverNix}";
20 in
20 in
21 if pkgs.lib.pathExists "${nixFile}" then
21 if pkgs.lib.pathExists "${nixFile}" then
22 builtins.trace
22 builtins.trace
23 "Using local vcsserver from ${nixFile}"
23 "Using local vcsserver from ${nixFile}"
24 import "${nixFile}" {inherit pkgs;}
24 import "${nixFile}" {inherit pkgs;}
25 else
25 else
26 null;
26 null;
27
27
28 hasVcsserver = !isNull vcsserver;
28 hasVcsserver = !isNull vcsserver;
29
29
30 enterprise = import ./default.nix {
30 enterprise = import ./default.nix {
31 inherit pkgs doCheck;
31 inherit pkgs doCheck;
32 };
32 };
33
33
34 pythonPackages = enterprise.pythonPackages;
34 pythonPackages = enterprise.pythonPackages;
35
35
36 in enterprise.override (attrs: {
36 in enterprise.override (attrs: {
37 # Avoid that we dump any sources into the store when entering the shell and
37 # Avoid that we dump any sources into the store when entering the shell and
38 # make development a little bit more convenient.
38 # make development a little bit more convenient.
39 src = null;
39 src = null;
40
40
41 buildInputs =
41 buildInputs =
42 attrs.buildInputs ++
42 attrs.buildInputs ++
43 pkgs.lib.optionals (hasVcsserver) vcsserver.propagatedNativeBuildInputs ++
43 pkgs.lib.optionals (hasVcsserver) vcsserver.propagatedNativeBuildInputs ++
44 (with pythonPackages; [
44 (with pythonPackages; [
45 bumpversion
45 bumpversion
46 invoke
46 invoke
47 ipdb
47 ipdb
48 locustio
49 ]);
48 ]);
50
49
51 shellHook = attrs.shellHook +
50 shellHook = attrs.shellHook +
52 pkgs.lib.strings.optionalString (hasVcsserver) ''
51 pkgs.lib.strings.optionalString (hasVcsserver) ''
53 # Setup the vcsserver development egg.
52 # Setup the vcsserver development egg.
54 pushd ${vcsserverAbsPath}
53 pushd ${vcsserverAbsPath}
55 python setup.py develop --prefix $tmp_path --allow-hosts ""
54 python setup.py develop --prefix $tmp_path --allow-hosts ""
56 popd
55 popd
57 '';
56 '';
58 })
57 })
General Comments 0
You need to be logged in to leave comments. Login now