diff --git a/.travis.yml b/.travis.yml index ad8e88035..08033bf87 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,7 +53,13 @@ before_install: - edm install -y wheel click coverage install: - - for toolkit in ${TOOLKITS}; do edm run -- python ci/edmtool.py install --runtime=${RUNTIME} --toolkit=${toolkit} || exit; done + - for toolkit in ${TOOLKITS}; do + if [[ ${TRAVIS_EVENT_TYPE} == "cron" ]] ; then + edm run -- python ci/edmtool.py install --runtime=${RUNTIME} --toolkit=${toolkit} --source || exit; + else + edm run -- python ci/edmtool.py install --runtime=${RUNTIME} --toolkit=${toolkit} || exit; + fi; + done script: - for toolkit in ${TOOLKITS}; do edm run -- python ci/edmtool.py test --runtime=${RUNTIME} --toolkit=${toolkit} || exit; done diff --git a/chaco/__init__.py b/chaco/__init__.py index 044dcf939..eab10bcaa 100644 --- a/chaco/__init__.py +++ b/chaco/__init__.py @@ -6,6 +6,10 @@ from ._version import full_version as __version__ # noqa __requires__ = [ + 'traits', + 'traitsui', + 'pyface', + 'numpy', 'enable', 'six' ] diff --git a/ci/edmtool.py b/ci/edmtool.py index 981f2203a..6931c888d 100644 --- a/ci/edmtool.py +++ b/ci/edmtool.py @@ -79,13 +79,27 @@ "mock", "numpy", "pandas", + "pyface", "pygments", "pyparsing", + "traits", + "traitsui", "cython", + "enable", # Needed to install enable from source "swig", } +# Dependencies we install from source for cron tests +source_dependencies = { + "enable", + "pyface", + "traits", + "traitsui", +} + +github_url_fmt = "git+http://github.com/enthought/{0}.git#egg={0}" + extra_dependencies = { 'pyside2': set(), # pyside2 is pip-installed during the install step 'pyqt': {'pyqt'}, @@ -114,7 +128,12 @@ def cli(): @click.option('--runtime', default='3.6') @click.option('--toolkit', default='null') @click.option('--environment', default=None) -def install(runtime, toolkit, environment): +@click.option( + "--source/--no-source", + default=False, + help="Install ETS packages from source", +) +def install(runtime, toolkit, environment, source): """ Install project and dependencies into a clean EDM environment. """ parameters = get_parameters(runtime, toolkit, environment) @@ -126,9 +145,6 @@ def install(runtime, toolkit, environment): "edm install -y -e {environment} {packages}", ("edm run -e {environment} -- pip install -r ci/requirements.txt" " --no-dependencies"), - # Note that enable dependencies will be installed implicitly using pip - ("edm run -e {environment} -- " - "pip install git+https://git@github.com/enthought/enable.git"), "edm run -e {environment} -- pip install . --no-deps", ] # pip install pyside2, because we don't have it in EDM yet @@ -139,6 +155,26 @@ def install(runtime, toolkit, environment): click.echo("Creating environment '{environment}'".format(**parameters)) execute(commands, parameters) + + if source: + # Remove EDM ETS packages and install them from source + cmd_fmt = ( + "edm plumbing remove-package " + "--environment {environment} --force " + ) + commands = [cmd_fmt + source_pkg for source_pkg in source_dependencies] + execute(commands, parameters) + source_pkgs = [ + github_url_fmt.format(pkg) for pkg in source_dependencies + ] + commands = [ + "python -m pip install {pkg} --no-deps".format(pkg=pkg) + for pkg in source_pkgs + ] + commands = [ + "edm run -e {environment} -- " + command for command in commands + ] + execute(commands, parameters) click.echo('Done install')