Skip to content

Commit 3d87227

Browse files
authored
Install ipynbname via pip
1 parent a5a2501 commit 3d87227

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

.travis.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,26 @@ env:
1919
- INSTALL_EXTRAS=[plotting,bloch_sphere_visualization,fancy_progressbar]
2020
- INSTALL_EXTRAS=[plotting,fancy_progressbar]
2121
- INSTALL_EXTRAS=[none]
22-
22+
2323
before_install:
2424
# Resolve INSTALL_EXTRAS into required packages for use with conda. HACKY
25+
# Split by comma and replace by parameter designator ($)
2526
- TMP=${INSTALL_EXTRAS//,/ $}
27+
# Take care of opening bracket separately
2628
- TMP=${TMP/[/$}
27-
- INSTALL_EXTRAS_PACKAGES=$(eval echo ${TMP%]})
28-
29+
# Replace the abstract extra names by the packages they require
30+
- TMP=$(eval echo ${TMP%]})
31+
# Remove ipynbname from conda packages (pip only)
32+
- INSTALL_EXTRAS_CONDA=${TMP// ipynbname/}
33+
2934
# Useful info for debugging
3035
- echo $TRAVIS_PYTHON_VERSION
3136
- echo $INSTALL_DEPS
3237
- echo $INSTALL_TEST_DEPS
3338
- echo $INSTALL_EXTRAS
34-
- echo $INSTALL_EXTRAS_PACKAGES
39+
- echo $INSTALL_EXTRAS_CONDA
3540

3641
# https://github.com/conda/conda/blob/master/docs/source/user-guide/tasks/use-conda-with-travis-ci.rst
37-
# We do this conditionally because it saves us some downloading if the
38-
# version is the same.
3942
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
4043
- bash miniconda.sh -b -u -p $HOME/miniconda
4144
- export PATH="$HOME/miniconda/bin:$PATH"
@@ -46,11 +49,12 @@ before_install:
4649
# Useful for debugging any issues with conda
4750
- conda info -a
4851

49-
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION $INSTALL_DEPS $INSTALL_TEST_DEPS $INSTALL_EXTRAS_PACKAGES
52+
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION $INSTALL_DEPS $INSTALL_TEST_DEPS $INSTALL_EXTRAS_CONDA
5053
- source activate test-environment
51-
54+
5255
install:
53-
- pip install .
56+
# Everything from INSTALL_EXTRAS should already be installed via conda, except for ipynbname
57+
- pip install .$INSTALL_EXTRAS
5458

5559
script:
5660
- pytest

0 commit comments

Comments
 (0)