GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix handling of empty directories in debugpy wheels when combining th… · haedeu/vscode-python@d103db1

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • pythonFiles
    • install_debugpy.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎pythonFiles/install_debugpy.py‎

Copy file name to clipboardExpand all lines: pythonFiles/install_debugpy.py
+7-12Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
DEBUGGER_DEST = os.path.join(EXTENSION_ROOT, "pythonFiles", "lib", "python")
1111
DEBUGGER_PACKAGE = "debugpy"
1212
DEBUGGER_PYTHON_ABI_VERSIONS = ("cp39",)
13-
DEBUGGER_VERSION = "1.4.3" # can also be "latest"
13+
DEBUGGER_VERSION = "1.5.0" # can also be "latest"
1414

1515

1616
def _contains(s, parts=()):
@@ -35,21 +35,16 @@ def _get_debugger_wheel_urls(data, version):
3535

3636
def _download_and_extract(root, url, version):
3737
root = os.getcwd() if root is None or root == "." else root
38-
prefix = os.path.join("debugpy-{0}.data".format(version), "purelib")
38+
print(url)
3939
with url_lib.urlopen(url) as response:
40-
# Extract only the contents of the purelib subfolder (parent folder of debugpy),
41-
# since debugpy files rely on the presence of a 'debugpy' folder.
42-
with zipfile.ZipFile(io.BytesIO(response.read()), "r") as wheel:
40+
data = response.read()
41+
with zipfile.ZipFile(io.BytesIO(data), "r") as wheel:
4342
for zip_info in wheel.infolist():
4443
# Ignore dist info since we are merging multiple wheels
45-
if ".dist-info" in zip_info.filename:
44+
if ".dist-info/" in zip_info.filename:
4645
continue
47-
# Normalize path for Windows, the wheel folder structure
48-
# uses forward slashes.
49-
normalized = os.path.normpath(zip_info.filename)
50-
# Flatten the folder structure.
51-
zip_info.filename = normalized.split(prefix)[-1]
52-
wheel.extract(zip_info, root)
46+
print("\t" + zip_info.filename)
47+
wheel.extract(zip_info.filename, root)
5348

5449

5550
def main(root):

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.