Repository navigation
Conversation
Replace the hand-built libiconv/zlib setup (kiyolee *-win-build repos compiled with msbuild and copied into win_libs/) with a vcpkg manifest. - Add vcpkg.json declaring libiconv and zlib, pinned via builtin-baseline. - Rewrite the windows_actions composite action: check out the baseline in the runner's vcpkg clone and bootstrap the matching tool (the preinstalled clone may predate the baseline), then install with the x64-/arm64-windows-static-md triplet. vcpkg_installed/ is cached keyed on runner arch and vcpkg.json. - setup.py: link iconv, charset and libzs from vcpkg_installed/<triplet> (overridable via VCPKG_INSTALLED_DIR / VCPKG_TARGET_TRIPLET). zlib 1.4 renamed its static MSVC library to libzs.lib. The conda fallback is unchanged. - Remove win_libs/ including the prebuilt sample libraries. - Update windows_compilation.md accordingly. The *-static-md triplets still link the libraries statically, so the wheels need no extra DLLs. Unlike the previous /MT builds, they use the dynamic CRT, matching Python and the extension itself, and give the same setup on x64 and ARM64.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
The PR WizardMac/ReadStat#439 added
vcpkgto ReadStat as this allowed a more general fix for a breaking change in zlib and improved the developer experience on Windows quite a bit. It's no longer the developer who has to find and provide zlib and libiconv. It's instead handled byvcpkgor Visual Studio, which has avcpkgintegration, automatically.Summary
This PR proposes to do the same for pyreadstat.
The benefit in developer experience on Windows isn't as large as for ReadStat but I think it's still a material improvement.
It also simplifies updating the dependencies for Windows as it's now only a bump of the
vcpkgbaseline.Changes
Replace the hand-built libiconv/zlib setup (kiyolee *-win-build repos compiled with msbuild and copied into win_libs/) with a vcpkg manifest.
(overridable via VCPKG_INSTALLED_DIR / VCPKG_TARGET_TRIPLET). zlib 1.4 renamed its static MSVC library to libzs.lib. The conda fallback is unchanged.
The *-static-md triplets still link the libraries statically, so the wheels need no extra DLLs. Unlike the previous /MT builds, they use the dynamic CRT, matching Python and the extension itself, and give the same setup on x64 and ARM64.
Impact on the wheels build
I'll post a separate draft PR for the wheels build. Then you can see how it would need to be modified if this PR is merged.