Skip to content

Vendor OpenSSL DLLs in Windows Python wheel - #1012

Closed
adsharma wants to merge 1 commit into
mainfrom
fix-windows-wheel-vendor-openssl
Closed

adsharma wants to merge 1 commit into
mainfrom
fix-windows-wheel-vendor-openssl

Conversation

@adsharma

Copy link
Copy Markdown
Contributor

Windows ladybug wheels ship _lbug.pyd linked dynamically against libssl-3-x64.dll / libcrypto-3-x64.dll, but delvewheel was told to --exclude them. On stock Windows (no OpenSSL 3 in PATH) import ladybug._lbug fails with DLL load failed, the backend silently falls back to the C-API shim, and that raises RuntimeError: Could not find lbug C API shared library (seen as red Windows jobs in mcp-server-ladybug CI, root cause behind LadybugDB/mcp-server-ladybug#3).

Per policy OpenSSL stays a DLL (never statically linked) so it can be serviced independently for security fixes — but the DLLs are now vendored into ladybug.libs/ like msvcp140 instead of excluded. Everything else remains statically linked into _lbug.pyd (verified: the only other non-system dep in the 0.20.4 wheel is the already-vendored msvcp140). Linux/macOS repair commands are unchanged.

_lbug.pyd links OpenSSL dynamically (libssl-3-x64.dll,
libcrypto-3-x64.dll), but delvewheel was told to exclude them, so
import ladybug fails on stock Windows with 'DLL load failed' and the
backend silently falls back to the C-API shim, which then raises
RuntimeError (missing lbug_shared.dll).

Keep OpenSSL as a DLL (never statically linked) so it can be serviced
independently for security fixes, but ship the DLLs inside
ladybug.libs/ like msvcp140. Everything else stays statically linked
into _lbug.pyd. Linux/macOS repair commands are unchanged.
@adsharma adsharma closed this Sep 23, 2026
@adsharma
adsharma deleted the fix-windows-wheel-vendor-openssl branch September 23, 2026 16:47
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.

1 participant