Skip to content
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

Fix Windows builds in CI #942

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

mathewhodson
Copy link
Contributor

This resolves the following error when building 'pywatchman.bser' extension:

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

@fanzeyi
Copy link
Member

fanzeyi commented Aug 31, 2021

Hi!

Thanks for looking into this. I spent some time a few weeks ago trying to fix this as well but I wasn't able to find the root case. Here are my findings in case its useful:

  • If I directly build the Python package with python setup.py on GitHub Windows environment, it works. (run, commit).
  • If I remove all the CMake stuff and most of the dependencies, it works. (run, commit)
  • If I only remove the CMake changes but still let getdeps build the dependencies, it fails. (run, commit)

You can find all my attempts at https://github.com/fanzeyi/watchman/actions?query=branch%3Afix-windows-ci++. I do amend and force push all the time so you will have to click on the commit id in the run to see what changes I made.

I suspect somehow having the dependencies messed up setuptools's logic to locate MSVC but I wasn't sure why. Hope this will be helpful. Let me know if you have any questions.

Simplify the Python targets in CMakeLists.txt.
This avoids adding too many entries to PATH and getting the error
"The input line is too long."
@mathewhodson mathewhodson changed the title Use python-setuptools for Windows builds in CI Fix Windows builds in CI Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants