-
Notifications
You must be signed in to change notification settings - Fork 12
/
setup.py
executable file
·45 lines (41 loc) · 1.5 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python
# Based on https://jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/Distributing%20Jupyter%20Extensions%20as%20Python%20Packages.html#Automatically-enabling-a-server-extension-and-nbextension
import setuptools, sys
from setuptools.command.bdist_egg import bdist_egg
class bdist_egg_disabled(bdist_egg):
"""Disabled version of bdist_egg
Prevents setup.py install performing setuptools' default easy_install,
which it should never ever do.
"""
def run(self):
sys.exit("Aborting implicit building of eggs. Use `pip install .` to install from source.")
setuptools.setup(
name="gap-jupyter",
include_package_data=True,
cmdclass={
"bdist_egg": bdist_egg_disabled,
},
data_files=[
# like `jupyter nbextension install --sys-prefix`
("share/jupyter/nbextensions/gap-mode", [
"etc/gap-mode/gap.js",
"etc/gap-mode/main.js",
]),
# like `jupyter nbextension enable --sys-prefix`
("etc/jupyter/nbconfig/notebook.d", [
"etc/gap-mode.json"
]),
# install kernel spec
("share/jupyter/kernels/gap-4", [
"etc/jupyter/kernel.json",
"etc/jupyter/logo-32x32.png",
"etc/jupyter/logo-64x64.png",
]),
],
# install the script
scripts=['bin/jupyter-kernel-gap'],
zip_safe=False,
# Require notebook>=5.3 for automatically enabling the nbextension
install_requires=['notebook>=5.3'],
packages=[],
)