From 8148b779318167708aa57f6ed5ee3983a74a056d Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 20 Oct 2020 12:54:56 +0200 Subject: [PATCH 01/28] produce voila-sourcemaps with only the sourcemaps --- README.md | 2 +- recipe/install_sourcemaps.sh | 6 ++++++ recipe/meta.yaml | 17 ++++++++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 recipe/install_sourcemaps.sh diff --git a/README.md b/README.md index ccb975f..b3450e0 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ conda config --add channels conda-forge Once the `conda-forge` channel has been enabled, `voila` can be installed with: ``` -conda install voila +conda install voila voila-sourcemap ``` It is possible to list all of the versions of `voila` available on your platform with: diff --git a/recipe/install_sourcemaps.sh b/recipe/install_sourcemaps.sh new file mode 100644 index 0000000..f1c11d2 --- /dev/null +++ b/recipe/install_sourcemaps.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +set -euo pipefail + +mkdir -p $PREFIX/lib/share/jupyter/voila/templates/base/static +cp $SRC_DIR/lib/share/jupyter/voila/templates/base/static/*.map $PREFIX/lib/share/jupyter/voila/templates/base/static diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 91e9b04..d8896eb 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -10,7 +10,7 @@ source: sha256: 332725b88fb026ad421db90fdad53d7e8de2ffd03a8584a55d9940465932ede8 build: - number: 0 + number: 1 noarch: python script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv entry_points: @@ -49,6 +49,21 @@ about: the ability to execute arbitrary code. dev_url: https://github.com/voila-dashboards/voila +outputs: + - name: voila + version: {{ version }} + files: + - "lib/python{{ PY_VER }}/site-packages/voila" + - name: voila-sourcemaps + version: {{ version }} + build: + noarch: python + requirements: + run: + - {{ pin_subpackage('voila', exact=True) }} + script: install_sourcemaps.sh + + extra: recipe-maintainers: - SylvainCorlay From f0ea5056fafc519949946a6bb75a1a26505198a7 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 20 Oct 2020 13:22:24 +0200 Subject: [PATCH 02/28] update docs, move outputs --- README.md | 4 ++-- recipe/install_sourcemaps.sh | 4 ++-- recipe/meta.yaml | 35 ++++++++++++++++++++--------------- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index b3450e0..db41647 100644 --- a/README.md +++ b/README.md @@ -49,10 +49,10 @@ Installing `voila` from the `conda-forge` channel can be achieved by adding `con conda config --add channels conda-forge ``` -Once the `conda-forge` channel has been enabled, `voila` can be installed with: +Once the `conda-forge` channel has been enabled, `voila` and `voila-sourcemaps` (only needed for debugging) can be installed with: ``` -conda install voila voila-sourcemap +conda install voila voila-sourcemaps ``` It is possible to list all of the versions of `voila` available on your platform with: diff --git a/recipe/install_sourcemaps.sh b/recipe/install_sourcemaps.sh index f1c11d2..dbb73c4 100644 --- a/recipe/install_sourcemaps.sh +++ b/recipe/install_sourcemaps.sh @@ -2,5 +2,5 @@ set -euo pipefail -mkdir -p $PREFIX/lib/share/jupyter/voila/templates/base/static -cp $SRC_DIR/lib/share/jupyter/voila/templates/base/static/*.map $PREFIX/lib/share/jupyter/voila/templates/base/static +mkdir -p $PREFIX/share/jupyter/voila/templates/base/static +cp $SRC_DIR/share/jupyter/voila/templates/base/static/*.map $PREFIX/share/jupyter/voila/templates/base/static diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d8896eb..7cafbc3 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -33,6 +33,26 @@ test: commands: - voila --help +outputs: + - name: voila + version: {{ version }} + files: + - "bin/voila" + - "lib/python{{ PY_VER }}/site-packages/voila" + - "share/jupyter/voila/" + - "etc/jupyter" + - name: voila-sourcemaps + version: {{ version }} + build: + noarch: python + requirements: + host: + - python + run: + - python + - {{ pin_subpackage('voila', exact=True) }} + script: install_sourcemaps.sh + about: home: https://github.com/voila-dashboards/voila license: BSD-3-Clause @@ -49,21 +69,6 @@ about: the ability to execute arbitrary code. dev_url: https://github.com/voila-dashboards/voila -outputs: - - name: voila - version: {{ version }} - files: - - "lib/python{{ PY_VER }}/site-packages/voila" - - name: voila-sourcemaps - version: {{ version }} - build: - noarch: python - requirements: - run: - - {{ pin_subpackage('voila', exact=True) }} - script: install_sourcemaps.sh - - extra: recipe-maintainers: - SylvainCorlay From 8971e068ee92a7479141afa8289272d97f226eeb Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 20 Oct 2020 13:46:26 +0200 Subject: [PATCH 03/28] build in place --- recipe/install_sourcemaps.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/install_sourcemaps.sh b/recipe/install_sourcemaps.sh index dbb73c4..360fdce 100644 --- a/recipe/install_sourcemaps.sh +++ b/recipe/install_sourcemaps.sh @@ -2,5 +2,7 @@ set -euo pipefail +# build again inside of the source tree +python $SRC_DIR/setup.py build mkdir -p $PREFIX/share/jupyter/voila/templates/base/static cp $SRC_DIR/share/jupyter/voila/templates/base/static/*.map $PREFIX/share/jupyter/voila/templates/base/static From 990a2d68f3284b10e2caa355e36a5fcadd73119f Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 20 Oct 2020 13:56:39 +0200 Subject: [PATCH 04/28] add pip and nodejs --- recipe/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 7cafbc3..d25b6af 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -48,6 +48,8 @@ outputs: requirements: host: - python + - pip + - nodejs run: - python - {{ pin_subpackage('voila', exact=True) }} From 8803bb94317a4f944700a171985438005a0aeb8e Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 20 Oct 2020 14:04:59 +0200 Subject: [PATCH 05/28] just run npm --- recipe/install_sourcemaps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/install_sourcemaps.sh b/recipe/install_sourcemaps.sh index 360fdce..640da25 100644 --- a/recipe/install_sourcemaps.sh +++ b/recipe/install_sourcemaps.sh @@ -3,6 +3,6 @@ set -euo pipefail # build again inside of the source tree -python $SRC_DIR/setup.py build +(cd $SRC_DIR/js; npm install) mkdir -p $PREFIX/share/jupyter/voila/templates/base/static cp $SRC_DIR/share/jupyter/voila/templates/base/static/*.map $PREFIX/share/jupyter/voila/templates/base/static From de57de1cf28978842c413915651f0913c2f8083a Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 20 Oct 2020 15:09:44 +0200 Subject: [PATCH 06/28] download 2 packages --- recipe/install_sourcemaps.sh | 4 +--- recipe/meta.yaml | 8 +++++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/recipe/install_sourcemaps.sh b/recipe/install_sourcemaps.sh index 640da25..cfb4872 100644 --- a/recipe/install_sourcemaps.sh +++ b/recipe/install_sourcemaps.sh @@ -2,7 +2,5 @@ set -euo pipefail -# build again inside of the source tree -(cd $SRC_DIR/js; npm install) mkdir -p $PREFIX/share/jupyter/voila/templates/base/static -cp $SRC_DIR/share/jupyter/voila/templates/base/static/*.map $PREFIX/share/jupyter/voila/templates/base/static +cp $SRC_DIR/voila-sourcemaps/share/jupyter/voila/templates/base/static/*.map $PREFIX/share/jupyter/voila/templates/base/static diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d25b6af..3cbb8a9 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -6,13 +6,15 @@ package: version: {{ version }} source: - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz - sha256: 332725b88fb026ad421db90fdad53d7e8de2ffd03a8584a55d9940465932ede8 + - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz + folder: {{ name }} + - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-sourcemaps-{{ version }}.tar.gz + folder: {{ name }}-sourcemaps build: number: 1 noarch: python - script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv + script: (cd {{name}} && {{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv)) entry_points: - voila = voila.app:main From d001e8fe343743e81eae95cb826685f065c37301 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 20 Oct 2020 15:21:51 +0200 Subject: [PATCH 07/28] wrong url --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 3cbb8a9..4a78f91 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -8,7 +8,7 @@ package: source: - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz folder: {{ name }} - - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-sourcemaps-{{ version }}.tar.gz + - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}-sourcemaps/{{ name }}-sourcemaps-{{ version }}.tar.gz folder: {{ name }}-sourcemaps build: From 8800ff999ac384efc52bdadd37bba0dcb2f75808 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 20 Oct 2020 15:28:35 +0200 Subject: [PATCH 08/28] fix script --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 4a78f91..99356a2 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -14,7 +14,7 @@ source: build: number: 1 noarch: python - script: (cd {{name}} && {{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv)) + script: {{ PYTHON }} -m pip install {{name}} --no-deps --ignore-installed --no-cache-dir -vvv entry_points: - voila = voila.app:main From 541fe672fd0796e862862c0cd80f6491a83bf20d Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 20 Oct 2020 15:29:31 +0200 Subject: [PATCH 09/28] fix script --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 99356a2..569d9c8 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -14,7 +14,7 @@ source: build: number: 1 noarch: python - script: {{ PYTHON }} -m pip install {{name}} --no-deps --ignore-installed --no-cache-dir -vvv + script: {{ PYTHON }} -m pip install {{ name }} --no-deps --ignore-installed --no-cache-dir -vvv entry_points: - voila = voila.app:main From f7d906742f3183e995da1f160364c18697eedb08 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 20 Oct 2020 16:14:02 +0200 Subject: [PATCH 10/28] install dir --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 569d9c8..e190140 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -14,7 +14,7 @@ source: build: number: 1 noarch: python - script: {{ PYTHON }} -m pip install {{ name }} --no-deps --ignore-installed --no-cache-dir -vvv + script: {{ PYTHON }} -m pip install ./{{ name }} --no-deps --ignore-installed --no-cache-dir -vvv entry_points: - voila = voila.app:main From f9c65345e6a61bbdb385c529e7b6a2723320367b Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 20 Oct 2020 16:25:31 +0200 Subject: [PATCH 11/28] license moved --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index e190140..59ccbbc 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -61,7 +61,7 @@ about: home: https://github.com/voila-dashboards/voila license: BSD-3-Clause license_family: BSD - license_file: LICENSE + license_file: voila/LICENSE summary: Rendering of live Jupyter notebooks with interactive widgets description: | Voila serves live Jupyter notebooks including Jupyter interactive widgets. From ff16c7e4b4624d6c2b0960f7e050bc8eb5539cf1 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 20 Oct 2020 16:39:48 +0200 Subject: [PATCH 12/28] put tests and build stuff under outputs --- recipe/meta.yaml | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 59ccbbc..010db60 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -8,15 +8,13 @@ package: source: - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz folder: {{ name }} + sha256: 332725b88fb026ad421db90fdad53d7e8de2ffd03a8584a55d9940465932ede8 - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}-sourcemaps/{{ name }}-sourcemaps-{{ version }}.tar.gz folder: {{ name }}-sourcemaps + sha256: 6b36c5e598c8ad43d56671589a01e24db19cc3e070d2841491663b7ff8e48c20 build: number: 1 - noarch: python - script: {{ PYTHON }} -m pip install ./{{ name }} --no-deps --ignore-installed --no-cache-dir -vvv - entry_points: - - voila = voila.app:main requirements: host: @@ -29,20 +27,19 @@ requirements: - jupyter_server >=0.3.0,<2 - nbclient >=0.4.0,<0.6 -test: - imports: - - voila - commands: - - voila --help - outputs: - name: voila version: {{ version }} - files: - - "bin/voila" - - "lib/python{{ PY_VER }}/site-packages/voila" - - "share/jupyter/voila/" - - "etc/jupyter" + script: {{ PYTHON }} -m pip install ./{{ name }} --no-deps --ignore-installed --no-cache-dir -vvv + build: + noarch: python + entry_points: + - voila = voila.app:main + test: + imports: + - voila + commands: + - voila --help - name: voila-sourcemaps version: {{ version }} build: From b4d6c13b96c78b6fff60694a79466a785dbc8ed8 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 20 Oct 2020 16:47:44 +0200 Subject: [PATCH 13/28] build twice? --- recipe/meta.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 010db60..b6a1077 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -15,6 +15,10 @@ source: build: number: 1 + noarch: python + script: {{ PYTHON }} -m pip install ./{{ name }} --no-deps --ignore-installed --no-cache-dir -vvv + entry_points: + - voila = voila.app:main requirements: host: From 88af42087f06d0bc553966e5581bcc1654cc1b98 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 20 Oct 2020 16:56:00 +0200 Subject: [PATCH 14/28] can script be part of build? --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index b6a1077..670278b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -34,8 +34,8 @@ requirements: outputs: - name: voila version: {{ version }} - script: {{ PYTHON }} -m pip install ./{{ name }} --no-deps --ignore-installed --no-cache-dir -vvv build: + script: {{ PYTHON }} -m pip install ./{{ name }} --no-deps --ignore-installed --no-cache-dir -vvv noarch: python entry_points: - voila = voila.app:main From 0a06025e1d872023da709e9c1b69cc7c182dabb8 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 20 Oct 2020 17:03:39 +0200 Subject: [PATCH 15/28] try with single build --- recipe/meta.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 670278b..f603717 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -15,10 +15,7 @@ source: build: number: 1 - noarch: python - script: {{ PYTHON }} -m pip install ./{{ name }} --no-deps --ignore-installed --no-cache-dir -vvv - entry_points: - - voila = voila.app:main + skip: true requirements: host: From e885494eac2b5b7ff6bd0dd655b8275d3cb8ef8c Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 20 Oct 2020 17:07:37 +0200 Subject: [PATCH 16/28] just use pip --- recipe/install_sourcemaps.sh | 6 ------ recipe/meta.yaml | 4 +--- 2 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 recipe/install_sourcemaps.sh diff --git a/recipe/install_sourcemaps.sh b/recipe/install_sourcemaps.sh deleted file mode 100644 index cfb4872..0000000 --- a/recipe/install_sourcemaps.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -mkdir -p $PREFIX/share/jupyter/voila/templates/base/static -cp $SRC_DIR/voila-sourcemaps/share/jupyter/voila/templates/base/static/*.map $PREFIX/share/jupyter/voila/templates/base/static diff --git a/recipe/meta.yaml b/recipe/meta.yaml index f603717..cdd0187 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -44,16 +44,14 @@ outputs: - name: voila-sourcemaps version: {{ version }} build: + script: {{ PYTHON }} -m pip install ./{{ name }}-sourcemaps --no-deps --ignore-installed --no-cache-dir -vvv noarch: python requirements: host: - python - pip - - nodejs run: - - python - {{ pin_subpackage('voila', exact=True) }} - script: install_sourcemaps.sh about: home: https://github.com/voila-dashboards/voila From bacb05a2d3d586c8df33de9fcced1884b493374b Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 20 Oct 2020 17:10:44 +0200 Subject: [PATCH 17/28] are test run? --- recipe/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index cdd0187..27bc5e5 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -38,9 +38,9 @@ outputs: - voila = voila.app:main test: imports: - - voila + - voila2 commands: - - voila --help + - voila2 --help - name: voila-sourcemaps version: {{ version }} build: From fdfc78ff5a4e7994c4faf6cf7d912f258fafe28e Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 20 Oct 2020 17:13:23 +0200 Subject: [PATCH 18/28] move requirements --- recipe/meta.yaml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 27bc5e5..5ddef2b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -17,17 +17,6 @@ build: number: 1 skip: true -requirements: - host: - - python >=3.6 - - pip - - nodejs - run: - - python >=3.6 - - nbconvert >=6.0.0,<7 - - jupyter_server >=0.3.0,<2 - - nbclient >=0.4.0,<0.6 - outputs: - name: voila version: {{ version }} @@ -36,6 +25,16 @@ outputs: noarch: python entry_points: - voila = voila.app:main + requirements: + host: + - python >=3.6 + - pip + - nodejs + run: + - python >=3.6 + - nbconvert >=6.0.0,<7 + - jupyter_server >=0.3.0,<2 + - nbclient >=0.4.0,<0.6 test: imports: - voila2 From c8214d6609b76ac790267975aecb4b75e373d7ed Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 20 Oct 2020 17:13:42 +0200 Subject: [PATCH 19/28] tests --- recipe/meta.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 5ddef2b..66316e3 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -37,9 +37,9 @@ outputs: - nbclient >=0.4.0,<0.6 test: imports: - - voila2 + - voila commands: - - voila2 --help + - voila --help - name: voila-sourcemaps version: {{ version }} build: @@ -51,6 +51,8 @@ outputs: - pip run: - {{ pin_subpackage('voila', exact=True) }} + test: + - test -f "${PREFIX}/share/jupyter/voila/templates//base/static/voila.js.map" about: home: https://github.com/voila-dashboards/voila From cba37b71f4e363b887352b27c1af38045e689016 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 20 Oct 2020 17:20:45 +0200 Subject: [PATCH 20/28] try with test scripts --- recipe/meta.yaml | 7 ++----- recipe/run_test_voila-sourcemaps.sh | 1 + recipe/run_test_voila.sh | 2 ++ 3 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 recipe/run_test_voila-sourcemaps.sh create mode 100644 recipe/run_test_voila.sh diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 66316e3..1023fb4 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -36,10 +36,7 @@ outputs: - jupyter_server >=0.3.0,<2 - nbclient >=0.4.0,<0.6 test: - imports: - - voila - commands: - - voila --help + script: run_test_voila.sh - name: voila-sourcemaps version: {{ version }} build: @@ -52,7 +49,7 @@ outputs: run: - {{ pin_subpackage('voila', exact=True) }} test: - - test -f "${PREFIX}/share/jupyter/voila/templates//base/static/voila.js.map" + script: run_test_voila-sourcemaps.sh about: home: https://github.com/voila-dashboards/voila diff --git a/recipe/run_test_voila-sourcemaps.sh b/recipe/run_test_voila-sourcemaps.sh new file mode 100644 index 0000000..c99f050 --- /dev/null +++ b/recipe/run_test_voila-sourcemaps.sh @@ -0,0 +1 @@ +test -f "${PREFIX}/share/jupyter/voila/templates//base/static/voila.js.map" diff --git a/recipe/run_test_voila.sh b/recipe/run_test_voila.sh new file mode 100644 index 0000000..c55835d --- /dev/null +++ b/recipe/run_test_voila.sh @@ -0,0 +1,2 @@ +python -c "import voila" +voila --help \ No newline at end of file From d95e1bec8ece60d13b795a8936db7bf88b82e45c Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 21 Oct 2020 09:39:23 +0200 Subject: [PATCH 21/28] no top level skip --- recipe/meta.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 1023fb4..6103bae 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -15,13 +15,12 @@ source: build: number: 1 - skip: true outputs: - name: voila version: {{ version }} + script: $PYTHON -m pip install ./{{ name }} --no-deps --ignore-installed --no-cache-dir -vvv build: - script: {{ PYTHON }} -m pip install ./{{ name }} --no-deps --ignore-installed --no-cache-dir -vvv noarch: python entry_points: - voila = voila.app:main @@ -39,8 +38,8 @@ outputs: script: run_test_voila.sh - name: voila-sourcemaps version: {{ version }} + script: $PYTHON -m pip install ./{{ name }}-sourcemaps --no-deps --ignore-installed --no-cache-dir -vvv build: - script: {{ PYTHON }} -m pip install ./{{ name }}-sourcemaps --no-deps --ignore-installed --no-cache-dir -vvv noarch: python requirements: host: From f96b48ef1de2a1ef181b9cd88532bd5f793a2da9 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 21 Oct 2020 10:11:09 +0200 Subject: [PATCH 22/28] run script as script file, not command --- recipe/meta.yaml | 7 ++++--- recipe/run_test_voila-sourcemaps.sh | 6 +++++- recipe/run_test_voila.sh | 8 ++++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 6103bae..d5ae3f6 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -19,7 +19,7 @@ build: outputs: - name: voila version: {{ version }} - script: $PYTHON -m pip install ./{{ name }} --no-deps --ignore-installed --no-cache-dir -vvv + script: install_voila.sh build: noarch: python entry_points: @@ -35,10 +35,11 @@ outputs: - jupyter_server >=0.3.0,<2 - nbclient >=0.4.0,<0.6 test: - script: run_test_voila.sh + commands: + - run_test_voila.sh - name: voila-sourcemaps version: {{ version }} - script: $PYTHON -m pip install ./{{ name }}-sourcemaps --no-deps --ignore-installed --no-cache-dir -vvv + script: install_voila-sourcemaps.sh build: noarch: python requirements: diff --git a/recipe/run_test_voila-sourcemaps.sh b/recipe/run_test_voila-sourcemaps.sh index c99f050..23e7fdd 100644 --- a/recipe/run_test_voila-sourcemaps.sh +++ b/recipe/run_test_voila-sourcemaps.sh @@ -1 +1,5 @@ -test -f "${PREFIX}/share/jupyter/voila/templates//base/static/voila.js.map" +#!/bin/bash + +set -euo pipefail + +test -f "${PREFIX}/share/jupyter/voila/templates//base/static/voila.js-NONEXISTING.map" diff --git a/recipe/run_test_voila.sh b/recipe/run_test_voila.sh index c55835d..dbada40 100644 --- a/recipe/run_test_voila.sh +++ b/recipe/run_test_voila.sh @@ -1,2 +1,6 @@ -python -c "import voila" -voila --help \ No newline at end of file +#!/bin/bash + +set -euo pipefail + +python -c "import voila2" +voila2 --help From 9d036808c0564b80c52e6c770844155f1e5ccaee Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 21 Oct 2020 10:17:18 +0200 Subject: [PATCH 23/28] add missing files --- recipe/install_voila-sourcemaps.sh | 6 ++++++ recipe/install_voila.sh | 1 + 2 files changed, 7 insertions(+) create mode 100644 recipe/install_voila-sourcemaps.sh create mode 100644 recipe/install_voila.sh diff --git a/recipe/install_voila-sourcemaps.sh b/recipe/install_voila-sourcemaps.sh new file mode 100644 index 0000000..276bb8e --- /dev/null +++ b/recipe/install_voila-sourcemaps.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +set -euo pipefail +# $PYTHON -m pip install ./voila-sourcemaps --no-deps --ignore-installed --no-cache-dir -vvv +mkdir -p $PREFIX/share/jupyter/voila/templates/base/static +cp $SRC_DIR/voila-sourcemaps/share/jupyter/voila/templates/base/static/*.map $PREFIX/share/jupyter/voila/templates/base/static diff --git a/recipe/install_voila.sh b/recipe/install_voila.sh new file mode 100644 index 0000000..46b3dc1 --- /dev/null +++ b/recipe/install_voila.sh @@ -0,0 +1 @@ +$PYTHON -m pip install ./voila --no-deps --ignore-installed --no-cache-dir -vvv From 178259673e4500cac07735327f6f2e2732323f22 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 21 Oct 2020 10:55:45 +0200 Subject: [PATCH 24/28] should fail on voila test --- recipe/meta.yaml | 3 +-- recipe/run_test_voila-sourcemaps.sh | 4 ++-- recipe/run_test_voila.sh | 3 ++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d5ae3f6..d7dc487 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -35,8 +35,7 @@ outputs: - jupyter_server >=0.3.0,<2 - nbclient >=0.4.0,<0.6 test: - commands: - - run_test_voila.sh + script: run_test_voila.sh - name: voila-sourcemaps version: {{ version }} script: install_voila-sourcemaps.sh diff --git a/recipe/run_test_voila-sourcemaps.sh b/recipe/run_test_voila-sourcemaps.sh index 23e7fdd..4256556 100644 --- a/recipe/run_test_voila-sourcemaps.sh +++ b/recipe/run_test_voila-sourcemaps.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -euo pipefail +set -euxo pipefail -test -f "${PREFIX}/share/jupyter/voila/templates//base/static/voila.js-NONEXISTING.map" +test -f "${PREFIX}/share/jupyter/voila/templates//base/static/voila.js.map" diff --git a/recipe/run_test_voila.sh b/recipe/run_test_voila.sh index dbada40..611da85 100644 --- a/recipe/run_test_voila.sh +++ b/recipe/run_test_voila.sh @@ -1,6 +1,7 @@ #!/bin/bash -set -euo pipefail +set -euxo pipefail +foo python -c "import voila2" voila2 --help From 72c1372f909598d9e735a4dcbf325ea9d0f7de2d Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 21 Oct 2020 11:40:40 +0200 Subject: [PATCH 25/28] change top level name --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d7dc487..987c899 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -2,7 +2,7 @@ {% set version = "0.2.4" %} package: - name: {{ name|lower }} + name: feedstock-{{ name|lower }} version: {{ version }} source: From 0f198a7a813c287af048ff81ffb1d6b9a9590303 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 21 Oct 2020 11:47:28 +0200 Subject: [PATCH 26/28] add bogus top level test to make linter happy --- recipe/meta.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 987c899..fd98989 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -16,6 +16,10 @@ source: build: number: 1 +test: + commands: + - echo "Tests are done in the outputs" + outputs: - name: voila version: {{ version }} From ad415575807c31df31ac3ff62fdbba9448f26d7e Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 21 Oct 2020 11:50:38 +0200 Subject: [PATCH 27/28] make test run --- recipe/run_test_voila.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipe/run_test_voila.sh b/recipe/run_test_voila.sh index 611da85..57a62cc 100644 --- a/recipe/run_test_voila.sh +++ b/recipe/run_test_voila.sh @@ -2,6 +2,5 @@ set -euxo pipefail -foo -python -c "import voila2" -voila2 --help +python -c "import voila" +voila --help From ebbe6478fa75756bd80e1772ec1b610cc362c3f1 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 21 Oct 2020 12:17:33 +0200 Subject: [PATCH 28/28] cleanups --- recipe/install_voila-sourcemaps.sh | 6 +++++- recipe/install_voila.sh | 4 ++++ recipe/meta.yaml | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/recipe/install_voila-sourcemaps.sh b/recipe/install_voila-sourcemaps.sh index 276bb8e..e3bcfe9 100644 --- a/recipe/install_voila-sourcemaps.sh +++ b/recipe/install_voila-sourcemaps.sh @@ -1,6 +1,10 @@ #!/bin/bash -set -euo pipefail +set -euxo pipefail + +# this currently fails, because the source distribution is broken # $PYTHON -m pip install ./voila-sourcemaps --no-deps --ignore-installed --no-cache-dir -vvv + +# TODO: on next release, we can remove the next lines mkdir -p $PREFIX/share/jupyter/voila/templates/base/static cp $SRC_DIR/voila-sourcemaps/share/jupyter/voila/templates/base/static/*.map $PREFIX/share/jupyter/voila/templates/base/static diff --git a/recipe/install_voila.sh b/recipe/install_voila.sh index 46b3dc1..a21d200 100644 --- a/recipe/install_voila.sh +++ b/recipe/install_voila.sh @@ -1 +1,5 @@ +#!/bin/bash + +set -euxo pipefail + $PYTHON -m pip install ./voila --no-deps --ignore-installed --no-cache-dir -vvv diff --git a/recipe/meta.yaml b/recipe/meta.yaml index fd98989..08caad9 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,8 +1,11 @@ {% set name = "voila" %} {% set version = "0.2.4" %} +# this recipe fetches both voila and voila-sourcemaps (which are released in tandom) + package: - name: feedstock-{{ name|lower }} + # the package name should not equal any of the output names, otherwise the tests do not run + name: {{ name|lower }}-combined version: {{ version }} source: