From b53f1366d0e515a1822796d636b4d61d8e3247c1 Mon Sep 17 00:00:00 2001 From: Sylvain Corlay Date: Wed, 28 Aug 2019 15:58:46 +0200 Subject: [PATCH] Only generate kernelspec when installing or building wheel --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index d1128d68f..c52c322f8 100644 --- a/setup.py +++ b/setup.py @@ -111,14 +111,14 @@ def run(self): ) -if any(a.startswith(('bdist', 'build', 'install')) for a in sys.argv): +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'. - # When installing from source, the full `sys.executable` can be used. if any(a.startswith('bdist') for a in sys.argv): argv = make_ipkernel_cmd(executable='python') - else: + # 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):