Skip to content

Commit

Permalink
Merge pull request ipython#941 from blink1073/fix-debugger-option
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored May 25, 2022
2 parents 3f9ed67 + 64d63a0 commit dd0a986
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion hatch_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,21 @@ def initialize(self, version, build_data):
sys.path.insert(0, here)
from ipykernel.kernelspec import make_ipkernel_cmd, write_kernel_spec

overrides = {}

# When building a standard wheel, the executable specified in the kernelspec is simply 'python'.
if version == "standard":
overrides["metadata"] = dict(debugger=True)
argv = make_ipkernel_cmd(executable="python")

# When installing an editable wheel, the full `sys.executable` can be used.
else:
argv = make_ipkernel_cmd()

overrides["argv"] = argv

dest = os.path.join(here, "data_kernelspec")
if os.path.exists(dest):
shutil.rmtree(dest)
write_kernel_spec(dest, overrides={"argv": argv})

write_kernel_spec(dest, overrides=overrides)

0 comments on commit dd0a986

Please sign in to comment.