Skip to content

Add plugins to wheels#1450

Merged
jswhit merged 39 commits intoUnidata:masterfrom
NotSqrt:wheels-with-plugins
Dec 8, 2025
Merged

Add plugins to wheels#1450
jswhit merged 39 commits intoUnidata:masterfrom
NotSqrt:wheels-with-plugins

Conversation

@NotSqrt
Copy link
Copy Markdown
Contributor

@NotSqrt NotSqrt commented Nov 18, 2025

To trigger the actions following #1447 and the new docker netcdf-manylinux images

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Nov 18, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ NotSqrt
❌ jswhit2


jswhit2 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@jswhit
Copy link
Copy Markdown
Collaborator

jswhit commented Nov 19, 2025

the plugins are working for linux, but not for windows or macos. It seems like the conda libnetcdf package for windows should be installing the plugins, but they are not being found, even if I set NETCDF_PLUGIN_DIR to point to where they should be installed. Looks like brew on macos should install at least zstd and bzip2, but netcdf4-python can't find them there either.

EDIT: looks like homebrew does not install the netcdf plugins on macos.

@ocefpaf
Copy link
Copy Markdown
Collaborator

ocefpaf commented Nov 20, 2025

the plugins are working for linux, but not for windows or macos. It seems like the conda libnetcdf package for windows should be installing the plugins, but they are not being found, even if I set NETCDF_PLUGIN_DIR to point to where they should be installed. Looks like brew on macos should install at least zstd and bzip2, but netcdf4-python can't find them there either.

EDIT: looks like homebrew does not install the netcdf plugins on macos.

I'll investigate this next week. I thought we had all the plugins in the Windows conda package.

@jswhit
Copy link
Copy Markdown
Collaborator

jswhit commented Nov 20, 2025

Updated the libnetcdf version to 4.9.3 on windows (this version has the netcdf plugins). The blosc plugin test fails with an HDF5 lib error, so I've skipped that test for now on windows. Switched to using conda for the macos wheel, and now plugins are found there also. However, the delocate step fails on macos since the libs linked by the plugins are not found.

@jswhit
Copy link
Copy Markdown
Collaborator

jswhit commented Nov 21, 2025

After converting the macos wheels to use conda installed libs, the compression plugin tests are working. The blosc test is still failing on windows though. I noticed that delvewheel was not installing the blosc dll into the wheel, so I many added it (along with zstd and lz4). That didn't help. Interestingly, the blosc test is passing in the "regular" github action tests - the only difference there is HDF5_PLUGIN_PATH is set to point to the location of the conda installed plugins.

@jswhit
Copy link
Copy Markdown
Collaborator

jswhit commented Nov 21, 2025

This h5py issue seems to be relevant for the windows blosc test failure we are seeing.

"the plugin calls back into the HDF5 API (several plugins do in order to determine chunk size and type information) then it needs to be the same instance of the HDF5 library that h5py is using - so plugins installed system wide that call into the API will not work"

This suggests that perhaps the plugin installed in the wheel is not using the same instance of the HDF5 library that netcdf4-python is using.

@jswhit
Copy link
Copy Markdown
Collaborator

jswhit commented Nov 21, 2025

@NotSqrt could you test one of the linux wheels generated here in a clean environment (outside the manylinux docker image environment) to make sure the plugins work? I can do the same for macos.

@jswhit
Copy link
Copy Markdown
Collaborator

jswhit commented Nov 22, 2025

Plugin tests pass on macos in a clean virtual environment.

@NotSqrt
Copy link
Copy Markdown
Contributor Author

NotSqrt commented Nov 24, 2025

@NotSqrt could you test one of the linux wheels generated here in a clean environment (outside the manylinux docker image environment) to make sure the plugins work? I can do the same for macos.

I've tested the x86_64 linux wheel from https://github.com/Unidata/netcdf4-python/actions/runs/19615699182, it works just like the wheel I've been building in my copy of the container.

@jswhit jswhit requested a review from ocefpaf November 24, 2025 21:13
@jswhit
Copy link
Copy Markdown
Collaborator

jswhit commented Nov 30, 2025

@ocefpaf will you have a chance to review anytime soon?

Copy link
Copy Markdown
Collaborator

@ocefpaf ocefpaf left a comment

Choose a reason for hiding this comment

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

Just some minor comments. LGTM!

Comment thread .github/workflows/cibuildwheel.yml Outdated
Comment thread .github/workflows/cibuildwheel.yml
Comment thread .github/workflows/miniconda.yml
@ocefpaf
Copy link
Copy Markdown
Collaborator

ocefpaf commented Dec 1, 2025

Here are the wheels sizes for macos:

Wheel Size Build identifier Time SHA256
netcdf4-1.7.4-cp310-cp310-macosx_14_0_arm64.whl22.2 MBcp310-macosx_arm642 minutes1537a668db8c6b966efe052d830add69bfc43fd7ac7ee4d79d4594fbae67252a
netcdf4-1.7.4-cp311-abi3-macosx_14_0_arm64.whl22.1 MBcp311-macosx_arm64a minute778e2184948bcc004e389fe4b86c0a1182c7cc8ceda3618b39df756e07fe1200

and

Wheel Size Build identifier Time SHA256
netcdf4-1.7.4-cp310-cp310-macosx_13_0_x86_64.whl9.5 MBcp310-macosx_x86_644 minutes1a3dd2e041ed3b17b608c4541db60d46d76eaffd520b770c887556584ed0d884
netcdf4-1.7.4-cp311-abi3-macosx_13_0_x86_64.whl9.5 MBcp311-macosx_x86_642 minutes34622e2520c9db2387732ff533c6b9ada79a744852980b6308f7264363a3dc98

I'll investigate why macos14 is ~20 MB. That is not bad... But not good either.

PS: I don't have a mac to test these wheels. It would be nice to test them in a "end user" laptop. @dopplershift sorry for the ping, but can you test them?

@jswhit
Copy link
Copy Markdown
Collaborator

jswhit commented Dec 1, 2025

Here are the contents of the mac and windows wheels.

mac:

Archive:  netcdf4-1.7.4-cp311-abi3-macosx_13_0_x86_64.whl (total 9.5mb)
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  11-24-2025 21:25   netCDF4/
        0  11-24-2025 21:24   netcdf4-1.7.4.dist-info/
        0  11-24-2025 21:25   netCDF4/plugins/
        0  11-24-2025 21:25   netCDF4/.dylibs/
     1189  11-24-2025 21:18   netCDF4/_netCDF4.pyi
    28479  11-24-2025 21:18   netCDF4/__init__.pyi
     1641  11-24-2025 21:18   netCDF4/__init__.py
    37431  11-24-2025 21:18   netCDF4/utils.py
   314859  11-24-2025 21:18   netCDF4/_netCDF4.pyx
  1174336  11-24-2025 21:25   netCDF4/_netCDF4.abi3.so
        0  11-24-2025 21:18   netCDF4/py.typed
    43920  11-24-2025 21:25   netCDF4/plugins/lib__nch5shuffle.dylib
        0  11-24-2025 21:18   netCDF4/plugins/empty.txt
    44000  11-24-2025 21:25   netCDF4/plugins/lib__nch5deflate.dylib
    53632  11-24-2025 21:25   netCDF4/plugins/lib__nczhdf5filters.dylib
    53552  11-24-2025 21:25   netCDF4/plugins/lib__nczstdfilters.dylib
    44080  11-24-2025 21:25   netCDF4/plugins/lib__nch5zstd.dylib
    44624  11-24-2025 21:25   netCDF4/plugins/lib__nch5blosc.dylib
    43984  11-24-2025 21:25   netCDF4/plugins/lib__nch5fletcher32.dylib
    44480  11-24-2025 21:25   netCDF4/plugins/lib__nch5szip.dylib
    44176  11-24-2025 21:25   netCDF4/plugins/lib__nch5bzip2.dylib
    66336  11-24-2025 21:25   netCDF4/.dylibs/libsnappy.1.2.2.dylib
   502128  11-24-2025 21:25   netCDF4/.dylibs/libdf.0.dylib
    37168  11-24-2025 21:25   netCDF4/.dylibs/libcom_err.3.0.dylib
   297264  11-24-2025 21:25   netCDF4/.dylibs/libssh2.1.0.1.dylib
   197264  11-24-2025 21:25   netCDF4/.dylibs/liblz4.1.10.0.dylib
  1177264  11-24-2025 21:25   netCDF4/.dylibs/libc++.1.0.dylib
  1175424  11-24-2025 21:25   netCDF4/.dylibs/libiconv.2.dylib
  1020816  11-24-2025 21:25   netCDF4/.dylibs/libssl.3.dylib
  1634368  11-24-2025 21:25   netCDF4/.dylibs/libnetcdf.22.dylib
  5625936  11-24-2025 21:25   netCDF4/.dylibs/libcrypto.3.dylib
  3856832  11-24-2025 21:25   netCDF4/.dylibs/libhdf5.310.dylib
   317152  11-24-2025 21:25   netCDF4/.dylibs/libgssapi_krb5.2.2.dylib
   178672  11-24-2025 21:25   netCDF4/.dylibs/libmfhdf.0.dylib
   100064  11-24-2025 21:25   netCDF4/.dylibs/libblosc.1.21.6.dylib
   108784  11-24-2025 21:25   netCDF4/.dylibs/libbz2.1.0.8.dylib
   120384  11-24-2025 21:25   netCDF4/.dylibs/libz.1.3.1.dylib
   143744  11-24-2025 21:25   netCDF4/.dylibs/libhdf5_hl.310.dylib
    58944  11-24-2025 21:25   netCDF4/.dylibs/libsz.2.0.1.dylib
   137232  11-24-2025 21:25   netCDF4/.dylibs/libzip.5.5.dylib
   196096  11-24-2025 21:25   netCDF4/.dylibs/libnghttp2.14.dylib
   833248  11-24-2025 21:25   netCDF4/.dylibs/libkrb5.3.3.dylib
   898896  11-24-2025 21:25   netCDF4/.dylibs/libcurl.4.dylib
   902208  11-24-2025 21:25   netCDF4/.dylibs/libjpeg.8.3.2.dylib
    65632  11-24-2025 21:25   netCDF4/.dylibs/libkrb5support.1.1.dylib
    94416  11-24-2025 21:25   netCDF4/.dylibs/libk5crypto.3.1.dylib
  1213792  11-24-2025 21:25   netCDF4/.dylibs/libxml2.16.dylib
  1019472  11-24-2025 21:25   netCDF4/.dylibs/libzstd.1.5.7.dylib
        0  11-24-2025 21:24   netcdf4-1.7.4.dist-info/licenses/
     4536  11-24-2025 21:25   netcdf4-1.7.4.dist-info/RECORD
      136  11-24-2025 21:25   netcdf4-1.7.4.dist-info/WHEEL
      116  11-24-2025 21:24   netcdf4-1.7.4.dist-info/entry_points.txt
        8  11-24-2025 21:24   netcdf4-1.7.4.dist-info/top_level.txt
     1893  11-24-2025 21:24   netcdf4-1.7.4.dist-info/METADATA
     1056  11-24-2025 21:24   netcdf4-1.7.4.dist-info/licenses/LICENSE
---------                     -------
 23961664                     55 files

rchive:  netcdf4-1.7.3-cp311-abi3-macosx_14_0_arm64.whl (total 22mb)
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  11-21-2025 14:51   netcdf4-1.7.3.dist-info/
        0  11-21-2025 14:51   netCDF4/
        0  11-21-2025 14:51   netcdf4-1.7.3.dist-info/licenses/
     4730  11-21-2025 14:51   netcdf4-1.7.3.dist-info/RECORD
      135  11-21-2025 14:51   netcdf4-1.7.3.dist-info/WHEEL
      116  11-21-2025 14:50   netcdf4-1.7.3.dist-info/entry_points.txt
        8  11-21-2025 14:50   netcdf4-1.7.3.dist-info/top_level.txt
     1893  11-21-2025 14:51   netcdf4-1.7.3.dist-info/METADATA
     1056  11-21-2025 14:51   netcdf4-1.7.3.dist-info/licenses/LICENSE
        0  11-21-2025 14:51   netCDF4/plugins/
        0  11-21-2025 14:51   netCDF4/.dylibs/
     1189  11-21-2025 14:47   netCDF4/_netCDF4.pyi
    28479  11-21-2025 14:47   netCDF4/__init__.pyi
     1641  11-21-2025 14:47   netCDF4/__init__.py
    37431  11-21-2025 14:47   netCDF4/utils.py
   314859  11-21-2025 14:47   netCDF4/_netCDF4.pyx
  1121888  11-21-2025 14:51   netCDF4/_netCDF4.abi3.so
        0  11-21-2025 14:47   netCDF4/py.typed
    85232  11-21-2025 14:51   netCDF4/plugins/lib__nch5shuffle.dylib
        0  11-21-2025 14:47   netCDF4/plugins/empty.txt
    85264  11-21-2025 14:51   netCDF4/plugins/lib__nch5deflate.dylib
    86656  11-21-2025 14:51   netCDF4/plugins/lib__nczhdf5filters.dylib
    86576  11-21-2025 14:51   netCDF4/plugins/lib__nczstdfilters.dylib
    85376  11-21-2025 14:51   netCDF4/plugins/lib__nch5zstd.dylib
    85936  11-21-2025 14:51   netCDF4/plugins/lib__nch5blosc.dylib
    85280  11-21-2025 14:51   netCDF4/plugins/lib__nch5fletcher32.dylib
    85792  11-21-2025 14:51   netCDF4/plugins/lib__nch5szip.dylib
    85488  11-21-2025 14:51   netCDF4/plugins/lib__nch5bzip2.dylib
    95104  11-21-2025 14:51   netCDF4/.dylibs/libsnappy.1.2.2.dylib
   549024  11-21-2025 14:51   netCDF4/.dylibs/libdf.0.dylib
    70208  11-21-2025 14:51   netCDF4/.dylibs/libcom_err.3.0.dylib
 30994864  11-21-2025 14:51   netCDF4/.dylibs/libicudata.75.1.dylib
   317392  11-21-2025 14:51   netCDF4/.dylibs/libssh2.1.0.1.dylib
   226160  11-21-2025 14:51   netCDF4/.dylibs/liblz4.1.10.0.dylib
  2026224  11-21-2025 14:51   netCDF4/.dylibs/libicuuc.75.1.dylib
  1173408  11-21-2025 14:51   netCDF4/.dylibs/libc++.1.0.dylib
  1191744  11-21-2025 14:51   netCDF4/.dylibs/libiconv.2.dylib
   982912  11-21-2025 14:51   netCDF4/.dylibs/libssl.3.dylib
  1542192  11-21-2025 14:51   netCDF4/.dylibs/libnetcdf.22.dylib
  5067872  11-21-2025 14:51   netCDF4/.dylibs/libcrypto.3.dylib
  3570464  11-21-2025 14:51   netCDF4/.dylibs/libhdf5.310.dylib
   333344  11-21-2025 14:51   netCDF4/.dylibs/libgssapi_krb5.2.2.dylib
   223008  11-21-2025 14:51   netCDF4/.dylibs/libmfhdf.0.dylib
   106976  11-21-2025 14:51   netCDF4/.dylibs/libblosc.1.21.6.dylib
   125296  11-21-2025 14:51   netCDF4/.dylibs/libbz2.1.0.8.dylib
   141008  11-21-2025 14:51   netCDF4/.dylibs/libz.1.3.1.dylib
   172640  11-21-2025 14:51   netCDF4/.dylibs/libhdf5_hl.310.dylib
    87840  11-21-2025 14:51   netCDF4/.dylibs/libsz.2.0.1.dylib
   170176  11-21-2025 14:51   netCDF4/.dylibs/libzip.5.5.dylib
   212416  11-21-2025 14:51   netCDF4/.dylibs/libnghttp2.14.dylib
   828864  11-21-2025 14:51   netCDF4/.dylibs/libkrb5.3.3.dylib
   881296  11-21-2025 14:51   netCDF4/.dylibs/libcurl.4.dylib
   648336  11-21-2025 14:51   netCDF4/.dylibs/libjpeg.8.3.2.dylib
    94528  11-21-2025 14:51   netCDF4/.dylibs/libkrb5support.1.1.dylib
   131552  11-21-2025 14:51   netCDF4/.dylibs/libk5crypto.3.1.dylib
  1196720  11-21-2025 14:51   netCDF4/.dylibs/libxml2.16.dylib
   848384  11-21-2025 14:51   netCDF4/.dylibs/libzstd.1.5.7.dylib
---------                     -------
 56294977                     57 files

windows

Archive:  netcdf4-1.7.4-cp311-abi3-win_amd64.whl (total 7.6mb)
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  11-24-2025 21:22   netCDF4/
        0  11-24-2025 21:22   netcdf4.libs/
        0  11-24-2025 21:22   netCDF4/plugins/
        0  11-24-2025 21:22   netCDF4/py.typed
    38396  11-24-2025 21:22   netCDF4/utils.py
   823296  11-24-2025 21:22   netCDF4/_netCDF4.pyd
     1242  11-24-2025 21:22   netCDF4/_netCDF4.pyi
   322293  11-24-2025 21:22   netCDF4/_netCDF4.pyx
     1995  11-24-2025 21:22   netCDF4/__init__.py
    29204  11-24-2025 21:22   netCDF4/__init__.pyi
        0  11-24-2025 21:22   netCDF4/plugins/empty.txt
    14336  11-24-2025 21:22   netCDF4/plugins/__nch5blosc.dll
    12800  11-24-2025 21:22   netCDF4/plugins/__nch5bzip2.dll
    12288  11-24-2025 21:22   netCDF4/plugins/__nch5deflate.dll
    14336  11-24-2025 21:22   netCDF4/plugins/__nch5fletcher32.dll
    12800  11-24-2025 21:22   netCDF4/plugins/__nch5shuffle.dll
    15360  11-24-2025 21:22   netCDF4/plugins/__nch5szip.dll
    11776  11-24-2025 21:22   netCDF4/plugins/__nch5zstd.dll
    26624  11-24-2025 21:22   netCDF4/plugins/__nczhdf5filters.dll
    26624  11-24-2025 21:22   netCDF4/plugins/__nczstdfilters.dll
    69632  12-06-2024 19:27   netcdf4.libs/blosc.dll
    12800  08-11-2025 10:45   netcdf4.libs/charset-c2e0e0c3746cd0adea79cd97ca45d5ae.dll
   501760  11-24-2025 21:22   netcdf4.libs/hdf-51fb5025f0b2df8f65efdf75be086deb.dll
  3417600  11-24-2025 21:22   netcdf4.libs/hdf5-6e55c87d8a2c045d50d43ab4bdabaccd.dll
   120320  11-24-2025 21:22   netcdf4.libs/hdf5_hl-4c6d8bdb018882a98cd18a2d251a02ad.dll
  1086464  11-24-2025 21:22   netcdf4.libs/iconv-a79705cfb230ca50002ac0b2bee53dca.dll
   685056  11-02-2025 14:46   netcdf4.libs/jpeg8-7947537302ab2a17fc34a1032d647e28.dll
    77824  09-09-2025 17:03   netcdf4.libs/libbz2-6f25e7b978408897e97f56c018c18fdc.dll
  7416832  11-11-2025 06:11   netcdf4.libs/libcrypto-3-x64-5cb355ce2f50dceefd4caae61d3cac6e.dll
   708608  11-24-2025 21:22   netcdf4.libs/libcurl-bd669647aeae035a345c7c974a5174f7.dll
   258048  11-24-2025 21:22   netcdf4.libs/libssh2-516921fbbff89fdd8a60641cddff9320.dll
  1234432  11-24-2025 21:22   netcdf4.libs/libxml2-bace995c27ee7dedde088494684729c4.dll
   127488  12-09-2024 10:44   netcdf4.libs/lz4.dll
   139264  11-24-2025 21:22   netcdf4.libs/mfhdf-1a0f256c900876351a363f224c92d418.dll
  1286656  11-24-2025 21:22   netcdf4.libs/netcdf-7417312293f2d10247d7514c6bac9513.dll
    33280  06-15-2025 13:19   netcdf4.libs/szip-e9ab9455d7f1571e99d4d3583b1999a2.dll
    14848  09-25-2023 17:10   netcdf4.libs/xdr-f37a01656114dfe30f5d4277755bad1d.dll
   111616  11-24-2025 21:22   netcdf4.libs/zip-362b07bcfc865fc0495ac3443d0cc49b.dll
    89088  10-03-2024 13:51   netcdf4.libs/zlib-7d86de8659d728d0cc22615ea37248ca.dll
   661504  03-20-2025 01:17   netcdf4.libs/zstd.dll
        0  11-24-2025 21:22   netcdf4-1.7.4.dist-info/licenses/
      442  11-24-2025 21:22   netcdf4-1.7.4.dist-info/DELVEWHEEL
      116  11-24-2025 21:22   netcdf4-1.7.4.dist-info/entry_points.txt
     1934  11-24-2025 21:22   netcdf4-1.7.4.dist-info/METADATA
     4200  11-24-2025 21:22   netcdf4-1.7.4.dist-info/RECORD
        8  11-24-2025 21:22   netcdf4-1.7.4.dist-info/top_level.txt
      100  11-24-2025 21:22   netcdf4-1.7.4.dist-info/WHEEL
     1063  11-24-2025 21:22   netcdf4-1.7.4.dist-info/licenses/LICENSE
---------                     -------
 19424353                     48 files

@jswhit
Copy link
Copy Markdown
Collaborator

jswhit commented Dec 1, 2025

the macos arm64 wheels include libicudata.dylib, which is huge. It's apparently needed by libxml2, which in turn is used by libnetcdf

@ocefpaf
Copy link
Copy Markdown
Collaborator

ocefpaf commented Dec 1, 2025

the macos arm64 wheels include libicudata.dylib, which is huge.

I need to figure out if libxml2, or some other dependency, is bringing that to the mix. In theory conda-forge/libxml2-feedstock#121 should've fixed that.

@jswhit jswhit changed the title Add plugins to changelog Add plugins to wheels Dec 2, 2025
@jswhit
Copy link
Copy Markdown
Collaborator

jswhit commented Dec 8, 2025

@ocefpaf I'd like to go ahead and merge while the issue of the size of the macos arm64 wheels is being worked on. Sound OK to you?

@ocefpaf
Copy link
Copy Markdown
Collaborator

ocefpaf commented Dec 8, 2025

@ocefpaf I'd like to go ahead and merge while the issue of the size of the macos arm64 wheels is being worked on. Sound OK to you?

I'm fine with that. Hopefully the size reduction will trickle down to the wheel in the next build.

@jswhit jswhit merged commit e652579 into Unidata:master Dec 8, 2025
121 of 140 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.

4 participants