19
19
- INSTALL_EXTRAS=[plotting,bloch_sphere_visualization,fancy_progressbar]
20
20
- INSTALL_EXTRAS=[plotting,fancy_progressbar]
21
21
- INSTALL_EXTRAS=[none]
22
-
22
+
23
23
before_install :
24
24
# Resolve INSTALL_EXTRAS into required packages for use with conda. HACKY
25
+ # Split by comma and replace by parameter designator ($)
25
26
- TMP=${INSTALL_EXTRAS//,/ $}
27
+ # Take care of opening bracket separately
26
28
- 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
+
29
34
# Useful info for debugging
30
35
- echo $TRAVIS_PYTHON_VERSION
31
36
- echo $INSTALL_DEPS
32
37
- echo $INSTALL_TEST_DEPS
33
38
- echo $INSTALL_EXTRAS
34
- - echo $INSTALL_EXTRAS_PACKAGES
39
+ - echo $INSTALL_EXTRAS_CONDA
35
40
36
41
# 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.
39
42
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
40
43
- bash miniconda.sh -b -u -p $HOME/miniconda
41
44
- export PATH="$HOME/miniconda/bin:$PATH"
@@ -46,11 +49,12 @@ before_install:
46
49
# Useful for debugging any issues with conda
47
50
- conda info -a
48
51
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
50
53
- source activate test-environment
51
-
54
+
52
55
install :
53
- - pip install .
56
+ # Everything from INSTALL_EXTRAS should already be installed via conda, except for ipynbname
57
+ - pip install .$INSTALL_EXTRAS
54
58
55
59
script :
56
60
- pytest
0 commit comments