Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ before_install:
- edm install -y wheel click coverage
install:
- for toolkit in ${TOOLKITS}; do edm run -- python etstool.py install --runtime=${RUNTIME} --toolkit=${toolkit} || exit; done
- if [[ ${TRAVIS_EVENT_TYPE} == 'cron' ]]; then for toolkit in ${TOOLKITS}; do edm run -- python etstool.py install --runtime=${RUNTIME} --toolkit=${toolkit} --source || exit; done; fi
script:
- for toolkit in ${TOOLKITS}; do edm run -- python etstool.py test --runtime=${RUNTIME} --toolkit=${toolkit} || exit; done

Expand Down
21 changes: 20 additions & 1 deletion etstool.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@

dependencies = {"traits", "numpy", "pygments", "coverage", "mock"}

# NOTE : traitsui is always installed from source
source_dependencies = {
"traits": "git+http://github.com/enthought/traits.git#egg=traits",
}

extra_dependencies = {
"pyside": {"pyside"},
# XXX once pyside2 is available in EDM, we will want it here
Expand Down Expand Up @@ -145,7 +150,8 @@ def cli():
@click.option("--runtime", default="3.6", help="Python version to use")
@click.option("--toolkit", default="pyqt", help="Toolkit and API to use")
@click.option("--environment", default=None, help="EDM environment to use")
def install(edm, runtime, toolkit, environment):
@click.option('--source/--no-source', default=False)
def install(edm, runtime, toolkit, environment, source):
""" Install project and dependencies into a clean EDM environment.

"""
Expand Down Expand Up @@ -184,6 +190,19 @@ def install(edm, runtime, toolkit, environment):

click.echo("Creating environment '{environment}'".format(**parameters))
execute(commands, parameters)

if source:
cmd_fmt = "edm plumbing remove-package --environment {environment} --force "
commands = [cmd_fmt+dependency for dependency in source_dependencies.keys()]
execute(commands, parameters)
source_pkgs = source_dependencies.values()
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")


Expand Down