I think I have resolved the issue using package_data. The following code
needed to be included in the setup.py script.
See
https://docs.python.org/3.6/distutils/setupscript.html#installing-package-data
setup(
...
package_dir={'mypkg': 'mypkg'},
package_data={'mypkg': ['static/*.js']}
)
Let me know if this is the desired configuration of the setup.py file. If
so I can sumbit a pull request on the appropriate doc, which I believe
is
https://github.com/jupyter/notebook/blob/e1e760367d3dfd10aa128584dd6be8ea54da64ec/docs/source/examples/Notebook/Distributing%20Jupyter%20Extensions%20as%20Python%20Packages.ipynb
On Friday, June 23, 2017 at 12:23:50 PM UTC-7, Adam Rule wrote:
>
> Hi,
>
> I am following the instructions in the documentation for distributing a
> server extension and nbextension in a single python module and am having
> difficulty getting my nbextension .js files to install when I run `python
> setup.py install`. I think I need to do something in my setup.py or
> Manifest.in file to tell the module to include the .js files in my static/
> folder, but I have so far been unsuccessful in doing so. When I manually
> copy the static/ folder into my module's folder in site-packages, the rest
> of the installation works wonderfully, but this should be automated.
>
> How do I inform the module that it needs to include the .js files in the
> static/ folder? Also, can the documentation be updated with a template
> setup.py file?
>
>
> http://jupyter-notebook.readthedocs.io/en/latest/examples/Notebook/Distributing%20Jupyter%20Extensions%20as%20Python%20Packages.html#Example---Server-extension-and-nbextension
>
> Much thanks!
>
--
You received this message because you are subscribed to the Google Groups
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jupyter/a1f81db0-953d-409a-bdc5-ff937e853507%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.