Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated widget activation/deactivation hack to a more sustainable manner #26

Merged
merged 3 commits into from
Mar 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,24 @@ package:
version: {{ version }}

source:
fn: {{ name }}-{{ version }}.tar.gz
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: {{ sha256 }}

build:
number: 0
script: python -m pip install --no-deps --ignore-installed --install-option="--conda" .
number: 1
script: |
python -m pip install --no-deps --ignore-installed --install-option="--conda" . ;
jupyter-nbextension install nglview --py --sys-prefix ;
jupyter-nbextension enable nglview --py --sys-prefix
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does this help user installing nglview? Does this only happen during the build process, not the install process?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marscher I am still confused here. Saying you run the build process on your computer, the jupyter-nbextension install and jupyter-nbextension enable only happen during the build process in your computer. If I install the built package to my computer, how does the enable happen?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The enable happens via an activation file stored in the installation prefix (as well as the JS files). The file(s) is created during the build process. This way the extension is also properly uninstalled.
Does this make sense to you now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sense to me now.

May be we already do that in setup.py:
https://github.com/arose/nglview/blob/master/setup.py#L40

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it's no hurt to do it again here in this recipe to be sure.

noarch: python

requirements:
build:
- python
- pip
- numpy
- ipywidgets >=7
- notebook
run:
- python
- numpy
Expand Down
2 changes: 0 additions & 2 deletions recipe/post-link.bat

This file was deleted.

4 changes: 0 additions & 4 deletions recipe/post-link.sh

This file was deleted.

3 changes: 0 additions & 3 deletions recipe/pre-unlink.bat

This file was deleted.

1 change: 0 additions & 1 deletion recipe/pre-unlink.sh

This file was deleted.