diff --git a/README.md b/README.md index ccb975f..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 +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_voila-sourcemaps.sh b/recipe/install_voila-sourcemaps.sh new file mode 100644 index 0000000..e3bcfe9 --- /dev/null +++ b/recipe/install_voila-sourcemaps.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +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 new file mode 100644 index 0000000..a21d200 --- /dev/null +++ b/recipe/install_voila.sh @@ -0,0 +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 91e9b04..08caad9 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,43 +1,67 @@ {% set name = "voila" %} {% set version = "0.2.4" %} +# this recipe fetches both voila and voila-sourcemaps (which are released in tandom) + package: - name: {{ 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: - 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 }} + sha256: 332725b88fb026ad421db90fdad53d7e8de2ffd03a8584a55d9940465932ede8 + - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}-sourcemaps/{{ name }}-sourcemaps-{{ version }}.tar.gz + folder: {{ name }}-sourcemaps + sha256: 6b36c5e598c8ad43d56671589a01e24db19cc3e070d2841491663b7ff8e48c20 build: - number: 0 - noarch: python - script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv - 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 + number: 1 test: - imports: - - voila commands: - - voila --help + - echo "Tests are done in the outputs" + +outputs: + - name: voila + version: {{ version }} + script: install_voila.sh + build: + 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: + script: run_test_voila.sh + - name: voila-sourcemaps + version: {{ version }} + script: install_voila-sourcemaps.sh + build: + noarch: python + requirements: + host: + - python + - pip + run: + - {{ pin_subpackage('voila', exact=True) }} + test: + script: run_test_voila-sourcemaps.sh 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. diff --git a/recipe/run_test_voila-sourcemaps.sh b/recipe/run_test_voila-sourcemaps.sh new file mode 100644 index 0000000..4256556 --- /dev/null +++ b/recipe/run_test_voila-sourcemaps.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -euxo pipefail + +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..57a62cc --- /dev/null +++ b/recipe/run_test_voila.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +set -euxo pipefail + +python -c "import voila" +voila --help