commit/galaxy-central: natefoo: There's no reliable way to use the Galaxy config file to control egg use/fetching since so many things use galaxy.eggs from outside of Galaxy, so drop the support for the config file options and rely on the environment variables only. Reverse the defaults so that eggs and fetching are enabled by default. I'll make sure that they properly get passed to the tool execution environments in the next commit.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/d540227165d5/ Changeset: d540227165d5 User: natefoo Date: 2015-02-12 20:10:19+00:00 Summary: There's no reliable way to use the Galaxy config file to control egg use/fetching since so many things use galaxy.eggs from outside of Galaxy, so drop the support for the config file options and rely on the environment variables only. Reverse the defaults so that eggs and fetching are enabled by default. I'll make sure that they properly get passed to the tool execution environments in the next commit. Affected #: 4 files diff -r fd753316154e8ad2a92bebffda9441c8614a06f5 -r d540227165d54950208d3948e2bdecd4babc70ca config/galaxy.ini.sample --- a/config/galaxy.ini.sample +++ b/config/galaxy.ini.sample @@ -125,34 +125,6 @@ # but prefixed with install_ are also available). #install_database_connection = sqlite:///./database/universe.sqlite?isolation_level=IMMEDIATE -# -- Galaxy framework dependencies (eggs) - -# Options in this section can also be provided as environment variables in the -# form `GALAXY_CONFIG_<OPTION_NAME>`, e.g. `GALAXY_CONFIG_ENABLE_EGGS=False`, -# etc. Environment variables override the settings in this config. - -# For more details, see the `requirements.txt` file at the root of the Galaxy -# source distribution. - -# Galaxy manages all of its dependent Python modules by downloading Python eggs -# from the Galaxy eggs distribution server at https://eggs.galaxyproject.org. -# You may choose to disable this and attempt to install dependencies by hand -# (e.g. with pip), but beware that this may cause problems due to version -# incompatibilities between Galaxy and its dependencies. Do not do this unless -# you know what you're doing. -#enable_eggs = True - -# You may choose to keep eggs enabled but disable fetching them automatically. -# (hint: To do a one-time fetch, you can disable here and then use -# `GALAXY_CONFIG_ENABLE_EGG_FETCH=True python ./scripts/fetch_eggs.py` from the -# root of the Galaxy source. -#enable_egg_fetch = True - -# If you'd like to prefer any dependencies found in your local environment -# before (fetching and) using Galaxy's egg of that dependency, you can enable -# the following option: -#try_dependencies_from_env = False - # -- Files and directories # Dataset files are stored in this directory. diff -r fd753316154e8ad2a92bebffda9441c8614a06f5 -r d540227165d54950208d3948e2bdecd4babc70ca lib/galaxy/eggs/__init__.py --- a/lib/galaxy/eggs/__init__.py +++ b/lib/galaxy/eggs/__init__.py @@ -403,8 +403,8 @@ always_conditional = ( 'pysam', 'ctypes', 'python_daemon' ) def __init__( self, config_file ): - self.enable_egg_fetch = False - self.enable_eggs = False + self.enable_egg_fetch = True + self.enable_eggs = True self.try_dependencies_from_env = False if config_file is None: self.config = None @@ -412,13 +412,6 @@ self.config = ConfigParser.ConfigParser() if self.config.read( config_file ) == []: raise Exception( "error: unable to read Galaxy config from %s" % config_file ) - self.enable_egg_fetch = True - self.enable_eggs = True - for opt in ('enable_egg_fetch', 'enable_eggs', 'try_dependencies_from_env'): - try: - setattr(self, opt, string_as_bool(self.config.get('app:main', opt))) - except: - pass # use default for opt in ('enable_egg_fetch', 'enable_eggs', 'try_dependencies_from_env'): var = 'GALAXY_CONFIG_' + opt.upper() if var in os.environ: diff -r fd753316154e8ad2a92bebffda9441c8614a06f5 -r d540227165d54950208d3948e2bdecd4babc70ca requirements.txt --- a/requirements.txt +++ b/requirements.txt @@ -12,8 +12,7 @@ # However, you may want to manage these dependencies on your own. If so, this # file can be used with pip to install all of the bare minimum dependencies for # starting a Galaxy server. Use this in conjunction with the -# `enable_eggs = False` galaxy.ini option or `GALAXY_CONFIG_ENABLE_EGGS=False` -# environment variable +# `GALAXY_CONFIG_ENABLE_EGGS=False` environment variable. # # Note that except in the case of SQLAlchemy, all dependencies will be # installed at their newest versions. Galaxy has not been tested with these and @@ -62,4 +61,3 @@ Parsley WebError http://svgfig.googlecode.com/files/svgfig-1.1.6.tgz - diff -r fd753316154e8ad2a92bebffda9441c8614a06f5 -r d540227165d54950208d3948e2bdecd4babc70ca scripts/paster.py --- a/scripts/paster.py +++ b/scripts/paster.py @@ -30,36 +30,6 @@ _log_tempfile = TempFile() import tempfile -try: - serve = sys.argv.index('serve') -except: - print >>sys.stderr, "Galaxy does not use the real Paste Script, the only supported command is 'serve'" - sys.exit(1) - -# eggs.require() can be called inside the app without access to the Galaxy -# config, so we need to push the egg options into the environment so they are -# available to Crate instantiated in require() - -# locate the arg containing the path to the config file -config = None -p = configparser.ConfigParser() -for arg in sys.argv: - try: - p.read(arg) - assert 'app:main' in p.sections() - config = arg - break - except (configparser.Error, AssertionError): - pass - -# find any egg options set in the config -crate = eggs.Crate(config) -for opt in ('enable_eggs', 'enable_egg_fetch', 'try_dependencies_from_env'): - env = 'GALAXY_CONFIG_' + opt.upper() - # don't overwrite existing env vars configured by the user - if env not in os.environ: - os.environ[env] = str(getattr(crate.galaxy_config, opt)) - eggs.require( "Paste" ) eggs.require( "PasteDeploy" ) Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org