10
10
from typing import Dict
11
11
12
12
from setuptools import setup
13
- from setuptools .command .bdist_egg import bdist_egg
14
13
15
14
# the name of the package
16
15
name = "ipykernel"
17
16
18
17
19
- class bdist_egg_disabled (bdist_egg ):
20
- """Disabled version of bdist_egg
21
-
22
- Prevents setup.py install from performing setuptools' default easy_install,
23
- which it should never ever do.
24
- """
25
-
26
- def run (self ):
27
- sys .exit ("Aborting implicit building of eggs. Use `pip install .` to install from source." )
28
-
29
-
30
- pjoin = os .path .join
31
- here = os .path .abspath (os .path .dirname (__file__ ))
32
- pkg_root = pjoin (here , name )
33
-
34
- packages = []
35
- for d , _ , _ in os .walk (pjoin (here , name )):
36
- if os .path .exists (pjoin (d , "__init__.py" )):
37
- packages .append (d [len (here ) + 1 :].replace (os .path .sep , "." ))
18
+ from os .path import join as pjoin
38
19
39
20
package_data = {
40
21
"ipykernel" : ["resources/*.*" , "py.typed" ],
41
22
}
42
23
43
- with open (pjoin (here , "README.md" )) as fid :
44
- LONG_DESCRIPTION = fid .read ()
45
24
46
25
setup_args : Dict [str , object ] = dict (
47
26
name = name ,
48
- cmdclass = {
49
- "bdist_egg" : bdist_egg if "bdist_egg" in sys .argv else bdist_egg_disabled ,
50
- },
51
27
scripts = glob (pjoin ("scripts" , "*" )),
52
- packages = packages ,
28
+ # packages=packages,
53
29
py_modules = ["ipykernel_launcher" ],
54
30
package_data = package_data ,
55
31
description = "IPython Kernel for Jupyter" ,
@@ -58,7 +34,7 @@ def run(self):
58
34
59
35
url = "https://ipython.org" ,
60
36
license = "BSD" ,
61
- long_description = LONG_DESCRIPTION ,
37
+ # long_description=LONG_DESCRIPTION,
62
38
platforms = "Linux, Mac OS X, Windows" ,
63
39
keywords = ["Interactive" , "Interpreter" , "Shell" , "Web" ],
64
40
project_urls = {
@@ -105,28 +81,28 @@ def run(self):
105
81
)
106
82
107
83
108
- if any (a .startswith (("bdist" , "install" )) for a in sys .argv ):
109
- sys .path .insert (0 , here )
110
- from ipykernel .kernelspec import KERNEL_NAME , make_ipkernel_cmd , write_kernel_spec
84
+ # if any(a.startswith(("bdist", "install")) for a in sys.argv):
85
+ # sys.path.insert(0, here)
86
+ # from ipykernel.kernelspec import KERNEL_NAME, make_ipkernel_cmd, write_kernel_spec
111
87
112
- # When building a wheel, the executable specified in the kernelspec is simply 'python'.
113
- if any (a .startswith ("bdist" ) for a in sys .argv ):
114
- argv = make_ipkernel_cmd (executable = "python" )
115
- # When installing from source, the full `sys.executable` can be used.
116
- if any (a .startswith ("install" ) for a in sys .argv ):
117
- argv = make_ipkernel_cmd ()
118
- dest = os .path .join (here , "data_kernelspec" )
119
- if os .path .exists (dest ):
120
- shutil .rmtree (dest )
121
- write_kernel_spec (dest , overrides = {"argv" : argv })
88
+ # # When building a wheel, the executable specified in the kernelspec is simply 'python'.
89
+ # if any(a.startswith("bdist") for a in sys.argv):
90
+ # argv = make_ipkernel_cmd(executable="python")
91
+ # # When installing from source, the full `sys.executable` can be used.
92
+ # if any(a.startswith("install") for a in sys.argv):
93
+ # argv = make_ipkernel_cmd()
94
+ # dest = os.path.join(here, "data_kernelspec")
95
+ # if os.path.exists(dest):
96
+ # shutil.rmtree(dest)
97
+ # write_kernel_spec(dest, overrides={"argv": argv})
122
98
123
- setup_args ["data_files" ] = [
124
- (
125
- pjoin ("share" , "jupyter" , "kernels" , KERNEL_NAME ),
126
- glob (pjoin ("data_kernelspec" , "*" )),
127
- )
128
- ]
99
+ # setup_args["data_files"] = [
100
+ # (
101
+ # pjoin("share", "jupyter", "kernels", KERNEL_NAME),
102
+ # glob(pjoin("data_kernelspec", "*")),
103
+ # )
104
+ # ]
129
105
130
106
131
- if __name__ == "__main__" :
132
- setup (** setup_args )
107
+ # if __name__ == "__main__":
108
+ setup (** setup_args )
0 commit comments