ports/devel/py-ipykernel/patches/patch-setup_py

31 lines
1,016 B
Text

Index: setup.py
--- setup.py.orig
+++ setup.py
@@ -113,27 +113,5 @@ setup_args = dict(
)
-if any(a.startswith(('bdist', 'install')) for a in sys.argv):
- from ipykernel.kernelspec import write_kernel_spec, make_ipkernel_cmd, KERNEL_NAME
-
- # When building a wheel, the executable specified in the kernelspec is simply 'python'.
- if any(a.startswith('bdist') for a in sys.argv):
- argv = make_ipkernel_cmd(executable='python')
- # When installing from source, the full `sys.executable` can be used.
- if any(a.startswith('install') for a in sys.argv):
- argv = make_ipkernel_cmd()
- dest = os.path.join(here, 'data_kernelspec')
- if os.path.exists(dest):
- shutil.rmtree(dest)
- write_kernel_spec(dest, overrides={'argv': argv})
-
- setup_args['data_files'] = [
- (
- pjoin('share', 'jupyter', 'kernels', KERNEL_NAME),
- glob(pjoin('data_kernelspec', '*')),
- )
- ]
-
-
if __name__ == '__main__':
setup(**setup_args)