Skip to content

Fixes for pysal and scipy#171

Merged
m-kuhn merged 2 commits intoopen-vcpkg:mainfrom
couteau:main
Feb 16, 2026
Merged

Fixes for pysal and scipy#171
m-kuhn merged 2 commits intoopen-vcpkg:mainfrom
couteau:main

Conversation

@couteau
Copy link
Contributor

@couteau couteau commented Feb 13, 2026

This PR does provides fixes for the py-pysal and py-scipy ports. For PySAL, it fixes a dependency issue that arose with the update to version 26.1. PySAL 26.1 depends on the lazy-loader package at runtime, which was not included in this repo and was being installed. This PR adds a lazy-loader port and then updates the PySAL port to list lazy-loader as a dependency.

For scipy, the PR addresses an issue where the built package was not being added to the vcpkg binary cache. Instead, an empty package was being cached, meaning that on subsequent installs from the cache, scipy would appear to successfully install, but no files would be present in the site-packages directory. This also addresses outstanding issues for QGIS PR qgis/QGIS#64589.

I've tested it on my local machine and it builds. At the moment, the GitHub build check succeeded for Windows, but failed for Mac--but not on this package. There is an issue where arrow-adbc is failing the SHA512 hash check for some reason. I'm seeing this when building locally, and also in the log for the build check GitHub action. Apparently, the Windows check succeeds because arrow-adbc is not a dependency of any of the packages included in the check (and specifically, because for Windows, we aren't checking the py-adbc-* packages).

@couteau couteau changed the title [py-pysal] add lazy-loader dependency Fixes for pysal and scipy Feb 15, 2026
@m-kuhn
Copy link
Contributor

m-kuhn commented Feb 16, 2026

@couteau thanks a lot for these fixes.

For py-adbc-*, could this be related to the relatively old baseline we are using and updating that to something more recent would improve things?

ref: 7c175421efa71616f86f7f02e053371a67e31bb2 # TODO: can we have a canonical baseline for tests?

set(pyfile "${subdir}/scipy/__config__.py")
file(READ "${pyfile}" contents)
string(REPLACE "${CURRENT_INSTALLED_DIR}" "$(prefix)" contents "${contents}")
string(REPLACE "r\"${VCPKG_PYTHON3}\"" "sys.executable" contents "${contents}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In QGIS, sys.executable is set to the qgis executable. I guess, this poses a problem here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied that from the NumPy port ,which also uses a __config__.py, to resolve a vcpkg warning about absolute paths in the resulting package, but on inspection, it doesn't look like that second replace actually does anything -- there are no instances of the word "executable" in the resulting file (neither for scipy nor for numpy).

The __config__.py file appears to be purely informational -- for use by extension developers to ensure they are using the same paths/same library versions/same build environments as the scipy package they are linking against. I'm happy to remove that line for purposes of this PR.

@couteau
Copy link
Contributor Author

couteau commented Feb 16, 2026

@couteau thanks a lot for these fixes.

For py-adbc-*, could this be related to the relatively old baseline we are using and updating that to something more recent would improve things?

ref: 7c175421efa71616f86f7f02e053371a67e31bb2 # TODO: can we have a canonical baseline for tests?

I don't think so. The arrow-adbc port on the main vcpkg repo has not been updated in about a year. And there are other issues on the repo about ports that seem to have randomly had the sha512 change (see mine here: microsoft/vcpkg#49963). I'm not sure how that could happen unless someone replaced the source tarball for that version on GitHub -- which if that happened would raise security concerns. I am working around it on my local machine by adding an overlay port for arrow-adbc to my QGIS build that grabs the source from the apache website instead of GitHub. I tried updating the adbc version but wasn't able to get it to build in my initial attempts.

@m-kuhn m-kuhn merged commit a3f181f into open-vcpkg:main Feb 16, 2026
8 checks passed
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.

2 participants