diff --git a/.ci/flake8_blacklist.txt b/.ci/flake8_blacklist.txt index 04ee7d84b7e..63bf819e1ea 100644 --- a/.ci/flake8_blacklist.txt +++ b/.ci/flake8_blacklist.txt @@ -4,3 +4,5 @@ database/ doc/patch.py doc/source/conf.py lib/galaxy/util/jstree.py +build/ +dist/ diff --git a/MANIFEST.in.galaxy b/MANIFEST.in.galaxy index c749475c802..6072b22831e 100644 --- a/MANIFEST.in.galaxy +++ b/MANIFEST.in.galaxy @@ -1,3 +1,4 @@ recursive-include lib/galaxy/web/framework/templates *.mako recursive-include lib/galaxy/web/framework/static * recursive-include lib/galaxy/tools/bundled * +recursive-include lib/galaxy/web/proxy/js * diff --git a/lib/galaxy/datatypes/registry.py b/lib/galaxy/datatypes/registry.py index 90e6048ed09..6db2f332c9c 100644 --- a/lib/galaxy/datatypes/registry.py +++ b/lib/galaxy/datatypes/registry.py @@ -107,7 +107,7 @@ class Registry( object ): self.converters_path_attr = registration.get( 'converters_path', 'lib/galaxy/datatypes/converters' ) self.converters_path = os.path.join( root_dir, self.converters_path_attr ) if self.converters_path_attr == 'lib/galaxy/datatypes/converters' \ - and not os.path.isdir( self.converters_path ): + and not os.path.isdir( self.converters_path ): # Deal with the old default of this path being set in # datatypes_conf.xml.sample (this path is not useful in an # "installed Galaxy" world) @@ -119,7 +119,7 @@ class Registry( object ): self.display_path_attr = registration.get( 'display_path', 'display_applications' ) self.display_applications_path = os.path.join( root_dir, self.display_path_attr ) if self.display_path_attr == 'display_applications' \ - and not os.path.isdir( 'display_applications' ): + and not os.path.isdir( 'display_applications' ): # Ditto as with converters_path self.display_path_attr = os.path.abspath( os.path.join( os.path.dirname( __file__ ), 'display_applications', 'configs' ) ) self.display_applications_path = self.display_path_attr diff --git a/lib/galaxy/web/framework/webapp.py b/lib/galaxy/web/framework/webapp.py index 8f7d7ee722b..ea46936c034 100644 --- a/lib/galaxy/web/framework/webapp.py +++ b/lib/galaxy/web/framework/webapp.py @@ -904,6 +904,10 @@ class GalaxyWebTransaction( base.DefaultWebTransaction, return str(template) +def default_url_path( path ): + return os.path.abspath( os.path.join( os.path.dirname( __file__ ), path ) ) + + def build_url_map( app, global_conf, local_conf ): from paste.urlmap import URLMap from galaxy.web.framework.middleware.static import CacheableStaticURLParser as Static @@ -915,14 +919,13 @@ def build_url_map( app, global_conf, local_conf ): cache_time = conf.get( "static_cache_time", None ) if cache_time is not None: cache_time = int( cache_time ) - _def = lambda x: os.path.abspath( os.path.join( os.path.dirname( __file__ ), x ) ) # Send to dynamic app by default urlmap["/"] = app # Define static mappings from config - urlmap["/static"] = Static( conf.get( "static_dir", _def("static/") ), cache_time ) - urlmap["/images"] = Static( conf.get( "static_images_dir", _def("static/images") ), cache_time ) - urlmap["/static/scripts"] = Static( conf.get( "static_scripts_dir", _def("static/scripts/") ), cache_time ) - urlmap["/static/style"] = Static( conf.get( "static_style_dir", _def("./static/style/blue") ), cache_time ) - urlmap["/favicon.ico"] = Static( conf.get( "static_favicon_dir", _def("./static/favicon.ico") ), cache_time ) - urlmap["/robots.txt"] = Static( conf.get( "static_robots_txt", _def("./static/robots.txt") ), cache_time ) + urlmap["/static"] = Static( conf.get( "static_dir", default_url_path("static/") ), cache_time ) + urlmap["/images"] = Static( conf.get( "static_images_dir", default_url_path("static/images") ), cache_time ) + urlmap["/static/scripts"] = Static( conf.get( "static_scripts_dir", default_url_path("static/scripts/") ), cache_time ) + urlmap["/static/style"] = Static( conf.get( "static_style_dir", default_url_path("./static/style/blue") ), cache_time ) + urlmap["/favicon.ico"] = Static( conf.get( "static_favicon_dir", default_url_path("./static/favicon.ico") ), cache_time ) + urlmap["/robots.txt"] = Static( conf.get( "static_robots_txt", default_url_path("./static/robots.txt") ), cache_time ) return urlmap, cache_time diff --git a/setup.py b/setup.py index 1ab4f3f41be..d1dfc85fd64 100644 --- a/setup.py +++ b/setup.py @@ -6,13 +6,9 @@ from setuptools import setup, find_packages readme = open('README.rst').read() -# Obviously this should not be empty, but for the moment, use: -# pip install -e git+https://github.com/natefoo/pip@linux-wheels#egg=pip && \ -# pip install -r requirements.txt --index-url https://wheels.galaxyproject.org/simple/ -requirements = [ -] - GALAXY_PACKAGE = os.environ.get("GALAXY_PACKAGE", "galaxy-lib") +VERSION = None + def _find_packages(base): r = [] @@ -40,18 +36,30 @@ if GALAXY_PACKAGE == "galaxy-lib": 'tools/imp_exp/imp_history_from_archive.xml', 'tools/imp_exp/exp_history_to_archive.xml', ] -elif GALAXY_PACKAGE == "galaxy-app": +elif GALAXY_PACKAGE == "galaxy": requirements = [ 'galaxy-lib', ] base_packages = [ + 'galaxy.actions', 'galaxy.auth', + 'galaxy.dataset_collections', 'galaxy.dependencies', 'galaxy.external_services', + 'galaxy.forms', 'galaxy.jobs', + 'galaxy.managers', 'galaxy.model', + 'galaxy.openid', 'galaxy.quota', + 'galaxy.sample_tracking', 'galaxy.security', + 'galaxy.tags', + 'galaxy.tours', + 'galaxy.visualization', + 'galaxy.web', + 'galaxy.webapps', + 'galaxy.workflow', 'galaxy.work', ] package_data = [ @@ -59,28 +67,7 @@ elif GALAXY_PACKAGE == "galaxy-app": 'jobs/runners/util/job_script/CLUSTER_SLOTS_STATEMENT.sh', 'model/migrate/migrate.cfg', 'dependencies/*.txt', - # FIXME: web/proxy/js/lib doesn't exist - #'web/proxy/js/*', ] -elif GALAXY_PACKAGE == "galaxy": - requirements = [ - 'galaxy-app', - ] - base_packages = [ - 'galaxy.actions', - 'galaxy.dataset_collections', - 'galaxy.forms', - 'galaxy.managers', - 'galaxy.openid', - 'galaxy.sample_tracking', - 'galaxy.tags', - 'galaxy.tours', - 'galaxy.visualization', - 'galaxy.web', - 'galaxy.webapps', - 'galaxy.workflow', - ] - package_data = [] elif GALAXY_PACKAGE == 'tool-shed': requirements = [ 'galaxy-app', @@ -105,7 +92,6 @@ execfile('lib/galaxy/version.py') scripts = ["scripts/galaxy"] setup( - #name='galaxy', name=GALAXY_PACKAGE, version=VERSION, description='Galaxy (http://galaxyproject.org/).', @@ -113,7 +99,6 @@ setup( author='Galaxy Project', author_email='galaxy-dev@lists.galaxyproject.org', url='https://github.com/galaxyproject/galaxy', - #packages=find_packages('lib'), packages=packages, entry_points=''' [console_scripts] diff --git a/test/functional/tools/upload.py b/test/functional/tools/upload.py index 6cf43a566b3..282421f9585 120000 --- a/test/functional/tools/upload.py +++ b/test/functional/tools/upload.py @@ -1 +1 @@ -../../../tools/data_source/upload.py \ No newline at end of file +../../../lib/galaxy/tools/bundled/data_source/upload.py \ No newline at end of file diff --git a/test/functional/tools/upload.xml b/test/functional/tools/upload.xml index 3096f6a2d4c..684a91b47ee 120000 --- a/test/functional/tools/upload.xml +++ b/test/functional/tools/upload.xml @@ -1 +1 @@ -../../../tools/data_source/upload.xml \ No newline at end of file +../../../lib/galaxy/tools/bundled/data_source/upload.xml \ No newline at end of file