open-vsx / publish-extensions

Scripts for publishing VS Code extensions to open-vsx.org
Eclipse Public License 2.0
225 stars 200 forks source link

Fix ms-python build #736

Closed apollo13 closed 5 months ago

apollo13 commented 5 months ago

I extracted the required commands from https://github.com/microsoft/vscode-python/blob/main/.github/actions/build-vsix/action.yml

@filiptronicek Is there any good way to test this locally? Also when to use prepublish and when to use custom?

filiptronicek commented 5 months ago

@apollo13 yes, although the repo is only tested on Ubuntu, it should also work on macOS. You can test a single extension as follows:

EXTENSIONS=ms-python.python SKIP_PUBLISH=true node publish-extensions

SKIP_PUBLISH makes sure it is only tested and not published.

apollo13 commented 5 months ago

Mhm it did build in CI (the failure is in Report results) and the size looks okay? I am having troubles building locally currently since I at least miss pyenv and others. Given that I copied 1:1 from the upstream action, it should work?

apollo13 commented 5 months ago

It also seems that

python -m pip --disable-pip-version-check install packaging

runs in my default python3.12. Shouldn't pyenv create a 3.8 env before that and run it in there?

filiptronicek commented 5 months ago

Shouldn't pyenv create a 3.8 env before that and run it in there?

Thanks to the version property on the extension item, pyenv will download the version and set it as the default for the duration of the extension's build.

"pythonVersion": "3.8",
image