mongodb / winkerberos

A native Kerberos client implementation for Python on Windows
Apache License 2.0
54 stars 15 forks source link

setup: Fix build in mingw #44

Closed Biswa96 closed 2 years ago

Biswa96 commented 2 years ago

MINGW_CHOST is specific to msys2 build and packaging environment. Instead, check sys.version which is available in any python env. Also remove SecPkgContext_Bindings definition which has been added in mingw-w64 headers.

Biswa96 commented 2 years ago

MINGW_CHOST was previous added in this pull request https://github.com/mongodb/winkerberos/pull/22 by @totaam. I can add a GHA CI setup to build in mingw environment, if required.

blink1073 commented 2 years ago

Hi @Biswa96, thanks for the patch! I agree we'd want to be sure things still work on mingw32, mingw64, and msys. If you'd like to work on the workflow, I think between https://github.com/marketplace/actions/setup-msys2 and https://github.com/marketplace/actions/install-mingw we could test building and importing the package. We can't run the full test suite without the kerberos server unfortunately.

Biswa96 commented 2 years ago

OK, I have added the build workflow.

blink1073 commented 2 years ago

Very nice, thanks! Can you please also add a step that does: python -c "import winkerberos;print(winkerberos.__version__)"

Biswa96 commented 2 years ago

Done. You can see my fork for the CI runs.

blink1073 commented 2 years ago

Hmm, it looks like I don't have access to see the runs:

image

blink1073 commented 2 years ago

Ah, it just wasn't in the UI, I found https://github.com/Biswa96/winkerberos/actions/runs/1808120979