Browse code

move documentation-building package installation to docker

Joseph Weston authored on 23/05/2019 10:30:35 • Anton Akhmerov committed on 27/05/2019 13:49:29
Showing 5 changed files
... ...
@@ -239,9 +239,6 @@ build documentation:
239 239
     - build:latest
240 240
   stage: test
241 241
   script:
242
-    - apt-get update && apt-get install -y librsvg2-bin  # for converting svgs to pdfs
243
-    - pip install git+https://github.com/jupyter-widgets/jupyter-sphinx sphinxcontrib-svg2pdfconverter
244
-    - python -m ipykernel install --user --name kwant-latest
245 242
     - make -C doc clean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W -D jupyter_execute_default_kernel=kwant-latest' SOURCE_LINK_TEMPLATE="$CI_PROJECT_URL"/blob/\$\$r/\$\$f
246 243
   artifacts:
247 244
     paths:
... ...
@@ -254,9 +251,6 @@ build PDF documentation:
254 251
     - build:latest
255 252
   stage: test
256 253
   script:
257
-    - apt-get update && apt-get install -y librsvg2-bin  # for converting svgs to pdfs
258
-    - pip install git+https://github.com/jupyter-widgets/jupyter-sphinx sphinxcontrib-svg2pdfconverter
259
-    - python -m ipykernel install --user --name kwant-latest
260 254
     - make -C doc latex SPHINXOPTS='-n -W -D jupyter_execute_default_kernel=kwant-latest'
261 255
     - cd doc/build/latex
262 256
     - make all-pdf
... ...
@@ -9,7 +9,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
9 9
         # Additional tools for running CI
10 10
         file rsync openssh-client \
11 11
         # Documentation building
12
-        inkscape texlive-full zip \
12
+        inkscape texlive-full zip librsvg2-bin \
13 13
     && apt-get clean && \
14 14
     rm -rf /var/lib/apt/lists/*
15 15
 
... ...
@@ -18,3 +18,5 @@ COPY kwant-latest.yml kwant-stable.yml kwant-stable-no-extras.yml /
18 18
 RUN conda env create -qf kwant-stable.yml
19 19
 RUN conda env create -qf kwant-stable-no-extras.yml
20 20
 RUN conda env create -qf kwant-latest.yml
21
+
22
+RUN /usr/local/envs/kwant-latest/bin/python -m ipykernel install --user --name kwant-latest
... ...
@@ -26,3 +26,6 @@ dependencies:
26 26
     - sphinx=1.7.4  # later versions seem to have problems
27 27
     - numpydoc
28 28
     - requests
29
+    - pip:
30
+        - sphinxcontrib-svg2pdfconverter
31
+        - git+https://github.com/jupyter-widgets/jupyter-sphinx
... ...
@@ -19,7 +19,3 @@ dependencies:
19 19
     - pytest-cov
20 20
     - pytest-flakes
21 21
     - pytest-pep8
22
-    # Documentation building
23
-    - sphinx=1.7.4  # later versions seem to have problems
24
-    - numpydoc
25
-    - requests
... ...
@@ -22,7 +22,3 @@ dependencies:
22 22
     - pytest-cov
23 23
     - pytest-flakes
24 24
     - pytest-pep8
25
-    # Documentation building
26
-    - sphinx=1.7.4  # later versions seem to have problems
27
-    - numpydoc
28
-    - requests