-
Notifications
You must be signed in to change notification settings - Fork 2
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
Cibw2 #28
Conversation
@rgommers, when creating wheels there are extra license files to be included in the wheel (e.g. https://github.com/andyfaff/scipy/blob/cibw2/tools/wheels/LICENSE_linux.txt). I've tried placing them in the scipy directory when the wheel is built (https://github.com/andyfaff/scipy/blob/cibw2/tools/wheels/cibw_before_build.sh#L8), but they don't end up in the wheel. Do I have to modify a config file somewhere to make sure they're bundled? |
They should not be bundled, they should be appended to the main license file, as done in https://github.com/MacPython/scipy-wheels/blob/master/patch_code.sh. What we need with cibuildwheel is pretty much the same as numpy already has, so you can use that as a reference: https://github.com/numpy/numpy/blob/main/tools/wheels/cibw_before_build.sh |
I'd prefer to not spend any more effort and CI time on that. |
You can leave this one alone; it's not yet supported in the Meson build and anyway we have never shipped wheels using ILP64. What it is is a specific ABI flavor of 64-bit BLAS. |
This you can copy from the numpy cibuildwheel config; there are two Anaconda buckets containing nightly and pre-release wheels. |
@rgommers the current stumbling block is scipy#14812 (comment). Trying to cross compile for macOS-arm64 on github actions requires a cross-file for meson. I'm not sure how to provide that to cibuildwheel (which is then calling cibuildwheel seems to be creating new venvs, so I don't know where to place the cross file ahead of time. |
I'll work on that, I think https://github.com/FFY00/meson-python/pull/122 should enable that. It'd be useful though to add one cross-compilation CI job for SciPy itself before making things more complex with the extra cibuildwheel layer on top. Can we progress everything other than the arm64 cross-compile job here, and do cross-compilation separately? There's enough other things to get right here that it makes sense to do it in >1 PR I think. |
Iinux and macos-x86_64 are probably very close to working. Not touched windows yet. |
@rgommers @mattip in this test run (L274) I'm finding that the 'default' gfortran setup for I transitioned to macos-11 in this PR because there's a scheduled brownout on I'm not sure if the issue is because that gfortran is so old, or because there's some other flags interfering, or there's an issue with meson. EDIT:
then the build proceeds as far as the delocate step, albeit with warnings along the lines of EDIT 2:
It therefore seems that gfortran-4.9.0 doesn't work on the |
We should be okay bumping the minimum version to macOS 10.13 or 10.14; IIRC that was necessary anyway for some other reasons. Also, our minimum GCC is 8 now, so I think it's time to get rid of that ancient Gfortran (also Cc @matthew-brett). Rebuilding the |
@rgommers, I'm having troubles with the windows build picking up where openblas is. Before cibuildwheel starts building a CIBW_BEFORE_BUILD script is run. As part of the script I obtain the precompiled openblas bundle. In this script I use However, when cibuildwheel starts meson isn't picking up any installed openblas (L281). This is despite the correct environment variable being set L9. I've spent a while trying to figure this out, so any insight you can provide would be welcome. (you have to provide environment variables to be passed through CIBW to the build environment as |
Here is the pkgconfig error line When the before build script checks pkgconfig it explicitly sets a |
Hmm, it's probably just the environment variable or the path somehow, but so far I've not spotted an issue in the logic.
gets translated by
seems fine. |
This is now a single line:
To check that |
@rgommers, @mattip, I spent several hours banging my head against the wall. THen about 5 mins after I made my last comment I discovered the solution to the issue. In this PR the CIBW_BEFORE_BUILD script is run as bash, even on a Windows machine. I am unfamiliar with bash scripts running on windows. In that bash script I was unzipping the openblas into |
@rgommers, there are a whole lot of these types of warning:
Not sure how to resolve that. |
Please ignore those warnings. I have already fixed them in NumPy, that's why they don't show up in our regular Meson on Windows CI. However, given that we have to build against older NumPy releases for wheels, there isn't much that we can do about these warnings there. |
3f0fb59
to
949791b
Compare
@rgommers, it's looking healthier now. Window AMD64, Linux x86_64 and aarch64 being built. Leaving macOS for now because the Fortran compiler/openBLAS aspect needs updating. The only issue is that the Windows wheels are all enormous, ~150 Mb. |
@andyfaff very nice! Re Windows wheel size, did you already look at why? Perhaps the stripping isn't done automatically. It should be strip[ing, that's the default set by |
A lot of the pyd files are on the order of 20 Mb. I'm unfamiliar with stripping, I'll read up on it. |
What @matthew-brett have you seen this before perhaps? |
TODO:
[wheels build]
, or if there is a tag pushed which begins with'v'
, and doesn't end with'dev0'
.win_AMD64
!site-packages
calledscipy.libs
which will contain a name-mangled libopenblas.dll. It also patchesscipy.__init__
to load the DLL fromscipy.libs
at import. I don't think it's possible to place.libs
within thescipy
directory itself.