1010DEBUGGER_DEST = os .path .join (EXTENSION_ROOT , "pythonFiles" , "lib" , "python" )
1111DEBUGGER_PACKAGE = "debugpy"
1212DEBUGGER_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
1616def _contains (s , parts = ()):
@@ -35,21 +35,16 @@ def _get_debugger_wheel_urls(data, version):
3535
3636def _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
5550def main (root ):
0 commit comments