Skip to content

Better help for GitHub Actions + Py27 workaround #354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 14, 2020

Conversation

henryiii
Copy link
Contributor

Mentioned in #333 discussion.

@henryiii
Copy link
Contributor Author

Also see microsoft/setup-msbuild#13 - setup-msbuild is very specifically only a way to setup msbuild and not the rest of the env variables needed by distutils.

@YannickJadoul
Copy link
Member

Oops, sorry! I should have looked better, when adding that :-(

Does this work better, perhaps? https://github.com/ilammy/msvc-dev-cmd
I can't believe MS doesn't have a better way to set up the environment :-|

@YannickJadoul
Copy link
Member

Sorry, wanted to comment but misclicked...

Was going to say I'd try myself, but I've not set up a GitHub Actions CI before, so it might be faster if you can try.

@henryiii
Copy link
Contributor Author

I can test that, I'm writing up docs anyway. They do mention the idea of having a setup action in the issue above, but they don't have one yet.

@YannickJadoul
Copy link
Member

Great, thanks! I'm really baffled there seems to be no official way to "activate" Visual Studio in GitHub Actions?

I also propose to maybe at the example code as a separate file to examples/, and just link to it? If we add this amount of example code for everything (i.e., not just for GitHub Actions, but also for Travis CI, etc), things might become messy.

@henryiii
Copy link
Contributor Author

Here's the example snippet:

  - uses: ilammy/msvc-dev-cmd@v1

  - name: Build 64-bit wheel
    run: python -m cibuildwheel --output-dir wheelhouse
    env:
      CIBW_BUILD: cp27-win_amd64
      DISTUTILS_USE_SDK: 1
      MSSdk: 1

  - uses: ilammy/msvc-dev-cmd@v1
    with:
      arch: x86

  - name: Build 32-bit wheel
    run: python -m cibuildwheel --output-dir wheelhouse
    env:
      CIBW_BUILD: cp27-win32
      DISTUTILS_USE_SDK: 1
      MSSdk: 1

Only saw a minimal example, so didn't change that.

@YannickJadoul
Copy link
Member

@joerick Good to merge, if it's up to me. But maybe you want to have a say on whether and how to include the example?

@joerick
Copy link
Contributor

joerick commented May 31, 2020

This looks good - would it also be appropriate to include that snippet after the illamy bullet point?

@henryiii
Copy link
Contributor Author

henryiii commented Jun 1, 2020

You mean the example snippet? I'd be happy to include it but wan't sure if it fit, since it's GHA only.

Is there a way to access <details><summary></summary></details> in the docs? That would be ideal :)

@henryiii
Copy link
Contributor Author

henryiii commented Jun 5, 2020

Added the snippet back in.

@henryiii
Copy link
Contributor Author

henryiii commented Jun 6, 2020

One travis build stalled, feel free to restart (or ignore, since this is documentation only).

@joerick joerick merged commit 7afdd40 into pypa:master Jun 14, 2020
@joerick
Copy link
Contributor

joerick commented Jun 14, 2020

Thank you @henryiii!

@henryiii henryiii deleted the patch-2 branch June 6, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants