From 8edb7206f1153359425c8549c3bc58c061758bb7 Mon Sep 17 00:00:00 2001 From: Radomir Stevanovic Date: Fri, 18 Mar 2022 11:07:31 -0700 Subject: [PATCH 1/3] CI: build vsix on leapide-* branches and PRs --- .github/workflows/build.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 27f67a681e7c..5305ad34ce39 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,6 +7,14 @@ on: - 'release' - 'release/*' - 'release-*' + - 'leapide-*' + pull_request: + branches: + - main + - 'release' + - 'release/*' + - 'release-*' + - 'leapide-*' env: NODE_VERSION: 12.15.0 @@ -21,7 +29,7 @@ env: jobs: setup: name: Set up - if: github.repository == 'microsoft/vscode-python' + #if: github.repository == 'microsoft/vscode-python' runs-on: ubuntu-latest defaults: run: @@ -43,7 +51,7 @@ jobs: build-vsix: name: Build VSIX - if: github.repository == 'microsoft/vscode-python' + #if: github.repository == 'microsoft/vscode-python' needs: setup runs-on: ubuntu-latest steps: From 1040901989b1e2088bf9445fd7b8000087922632 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Mon, 4 Oct 2021 15:12:19 -0700 Subject: [PATCH 2/3] [backport] Pin debugpy (#17619) * pin to debugpy verion 1.4.3 * Pin to particular version of debugpy. --- pythonFiles/install_debugpy.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pythonFiles/install_debugpy.py b/pythonFiles/install_debugpy.py index a74a860cbbf6..3aa3a60c3091 100644 --- a/pythonFiles/install_debugpy.py +++ b/pythonFiles/install_debugpy.py @@ -9,7 +9,8 @@ EXTENSION_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) DEBUGGER_DEST = os.path.join(EXTENSION_ROOT, "pythonFiles", "lib", "python") DEBUGGER_PACKAGE = "debugpy" -DEBUGGER_PYTHON_VERSIONS = ("cp39",) +DEBUGGER_PYTHON_ABI_VERSIONS = ("cp39",) +DEBUGGER_VERSION = "1.4.3" # can also be "latest" def _contains(s, parts=()): @@ -28,7 +29,7 @@ def _get_debugger_wheel_urls(data, version): return list( r["url"] for r in data["releases"][version] - if _contains(r["url"], DEBUGGER_PYTHON_VERSIONS) + if _contains(r["url"], DEBUGGER_PYTHON_ABI_VERSIONS) ) @@ -53,10 +54,14 @@ def _download_and_extract(root, url, version): def main(root): data = _get_package_data() - latest_version = max(data["releases"].keys(), key=version_parser) - for url in _get_debugger_wheel_urls(data, latest_version): - _download_and_extract(root, url, latest_version) + if DEBUGGER_VERSION == "latest": + use_version = max(data["releases"].keys(), key=version_parser) + else: + use_version = DEBUGGER_VERSION + + for url in _get_debugger_wheel_urls(data, use_version): + _download_and_extract(root, url, use_version) if __name__ == "__main__": From 5dc999af05dbe95470e09c4e18ee2b57e9a58d68 Mon Sep 17 00:00:00 2001 From: Pavel Minaev Date: Mon, 4 Oct 2021 16:08:32 -0700 Subject: [PATCH 3/3] [backport] Fix debugpy installer to handle the latest version Fix handling of empty directories in debugpy wheels when combining them. (#17620) Add filename logging when combining wheels. Update debugpy to 1.5.0. --- pythonFiles/install_debugpy.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/pythonFiles/install_debugpy.py b/pythonFiles/install_debugpy.py index 3aa3a60c3091..52d432215534 100644 --- a/pythonFiles/install_debugpy.py +++ b/pythonFiles/install_debugpy.py @@ -10,7 +10,7 @@ DEBUGGER_DEST = os.path.join(EXTENSION_ROOT, "pythonFiles", "lib", "python") DEBUGGER_PACKAGE = "debugpy" DEBUGGER_PYTHON_ABI_VERSIONS = ("cp39",) -DEBUGGER_VERSION = "1.4.3" # can also be "latest" +DEBUGGER_VERSION = "1.5.0" # can also be "latest" def _contains(s, parts=()): @@ -35,21 +35,16 @@ def _get_debugger_wheel_urls(data, version): def _download_and_extract(root, url, version): root = os.getcwd() if root is None or root == "." else root - prefix = os.path.join("debugpy-{0}.data".format(version), "purelib") + print(url) with url_lib.urlopen(url) as response: - # Extract only the contents of the purelib subfolder (parent folder of debugpy), - # since debugpy files rely on the presence of a 'debugpy' folder. - with zipfile.ZipFile(io.BytesIO(response.read()), "r") as wheel: + data = response.read() + with zipfile.ZipFile(io.BytesIO(data), "r") as wheel: for zip_info in wheel.infolist(): # Ignore dist info since we are merging multiple wheels - if ".dist-info" in zip_info.filename: + if ".dist-info/" in zip_info.filename: continue - # Normalize path for Windows, the wheel folder structure - # uses forward slashes. - normalized = os.path.normpath(zip_info.filename) - # Flatten the folder structure. - zip_info.filename = normalized.split(prefix)[-1] - wheel.extract(zip_info, root) + print("\t" + zip_info.filename) + wheel.extract(zip_info.filename, root) def main(root):