10
10
DEBUGGER_DEST = os .path .join (EXTENSION_ROOT , "pythonFiles" , "lib" , "python" )
11
11
DEBUGGER_PACKAGE = "debugpy"
12
12
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"
14
14
15
15
16
16
def _contains (s , parts = ()):
@@ -35,21 +35,16 @@ def _get_debugger_wheel_urls(data, version):
35
35
36
36
def _download_and_extract (root , url , version ):
37
37
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 )
39
39
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 :
43
42
for zip_info in wheel .infolist ():
44
43
# 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 :
46
45
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 )
53
48
54
49
55
50
def main (root ):
0 commit comments