- Use `conda_activate`, which works also under dash
- Run `conda_activate` also when `$GALAXY_CONDA_ENV` already exists
- Run `virtualenv` when the conda env is active but `$GALAXY_VIRTUAL_ENV`
does not exist
- Update the default for `GALAXY_CONDA_ENV` in
scripts/common_startup_functions.sh
Follow-up on https://github.com/galaxyproject/galaxy/pull/6975 .
which bundles `wheel` 0.32.2.
The old virtualenv 13.1.2 included wheel 0.24.0, where tagging is broken
for Python >=3.5, producing tracebacks like:
```
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-c53eutpg/uwsgi/setup.py", line 138, in <module>
'Programming Language :: Python :: 3.6',
File "/tmp/wheel_venv/lib/python3.7/site-packages/setuptools/__init__.py", line 143, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/wheel_venv/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 213, in run
archive_basename = self.get_archive_basename()
File "/tmp/wheel_venv/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 161, in get_archive_basename
impl_tag, abi_tag, plat_tag = self.get_tag()
File "/tmp/wheel_venv/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 155, in get_tag
assert tag == supported_tags[0]
AssertionError
```
This was fixed in wheel 0.25.0. Reported by @wm75.
Also update `urlretrieve` import for Python 3.
`logging.exception()` already adds the the exception information after
the supplied message.
Also: the `message` attribute of `Exception` class has been dropped in
Python 3, always use `str(e)`.
xref. https://github.com/galaxyproject/galaxy/issues/1715
when `VERSION_MINOR` in `lib/galaxy/version.py` is e.g. `rc1`.
Also:
- Do not require awk
- Remove unused functions
- Do not require the presence of `~/.github.json` file
and starting Galaxy with `APP_WEBSERVER=gunicorn sh run.sh`.
Additional gunicorn cmdline arguments can be passed using
`GUNICORN_CMD_ARGS`. In a first pass this will allow
running planemo {server, test} under python 3, as Paste
has some problems under python 3:
```
galaxy.web.stack INFO 2018-09-29 22:16:00,216 Galaxy server instance 'main' is running
Traceback (most recent call last):
File "./scripts/paster.py", line 27, in <module>
serve.run()
File "/tmp/tmpv5tow6c8/galaxy-dev/lib/galaxy/util/pastescript/serve.py", line 1055, in run
invoke(command, command_name, options, args[1:])
File "/tmp/tmpv5tow6c8/galaxy-dev/lib/galaxy/util/pastescript/serve.py", line 1061, in invoke
exit_code = runner.run(args)
File "/tmp/tmpv5tow6c8/galaxy-dev/lib/galaxy/util/pastescript/serve.py", line 226, in run
result = self.command()
File "/tmp/tmpv5tow6c8/galaxy-dev/lib/galaxy/util/pastescript/serve.py", line 676, in command
serve()
File "/tmp/tmpv5tow6c8/galaxy-dev/lib/galaxy/util/pastescript/serve.py", line 653, in serve
server(app)
File "/tmp/tmpv5tow6c8/galaxy-dev/lib/galaxy/util/pastescript/loadwsgi.py", line 232, in server_wrapper
**context.local_conf)
File "/tmp/tmpv5tow6c8/galaxy-dev/lib/galaxy/util/pastescript/loadwsgi.py", line 90, in fix_call
val = callable(*args, **kw)
File "/home/travis/.planemo/gx_venv_3_release_18.09/lib/python3.6/site-packages/paste/httpserver.py", line 1353, in server_runner
for name, value in kwargs.items():
RuntimeError: dictionary changed size during iteration
```
That said gunicorn is a nice pure-python alternative to paste going
forward.