Closed minrk closed 6 months ago
libzmq's libsodium & cmake build steps are here and amount to:
msbuild /v:minimal /p:Configuration=%Configuration%DLL builds\msvc\%MSVCYEAR%\libsodium\libsodium.vcxproj
Copy-Item "bin\${env:Platform}\${env:Configuration}\${env:MSVCVERSION}\dynamic\libsodium.lib" -Destination "bin\${env:Platform}\${env:Configuration}\${env:MSVCVERSION}\dynamic\sodium.lib"
cmake -D CMAKE_INCLUDE_PATH="%SODIUM_INCLUDE_DIR%" -D CMAKE_LIBRARY_PATH="%SODIUM_LIBRARY_DIR%" -D WITH_LIBSODIUM="%WITH_LIBSODIUM%" -D ENABLE_DRAFTS="%ENABLE_DRAFTS%" -D ENABLE_ANALYSIS="%ENABLE_ANALYSIS%" -D ENABLE_CURVE="%ENABLE_CURVE%" -D API_POLLER="%API_POLLER%" -D POLLER="%POLLER%" %EXTRA_FLAGS% -D WITH_LIBSODIUM="%WITH_LIBSODIUM%" -D LIBZMQ_WERROR="%LIBZMQ_WERROR%" -G "%CMAKE_GENERATOR%" "%LIBZMQ_SRCDIR%"
cmake --build . --config %configuration% --target install -- -verbosity:Minimal -maxcpucount
it should be a relatively small task to switch those builds to static and run these commands as custom targets, at least for someone who understands more about meson and Windows builds than I do.
need to figure out how to prevent ExternalProject from running configure during sdist:
zeromq| Running command ['/home/runner/work/pyzmq/pyzmq/subprojects/zeromq-4.3.5/configure', '--prefix=/usr/local', '--libdir=/usr/local/lib/x86_64-linux-gnu', '--includedir=/usr/local/include', '--with-libsodium', '--disable-libsodium_randombytes_close', '--disable-Werror', '--disable-drafts', '--disable-shared', '--enable-static'] in directory /home/runner/work/pyzmq/pyzmq/.mesonpy-ycdea0r2/subprojects/zeromq-4.3.5/build
../subprojects/zeromq-4.3.5/meson.build:13:8: ERROR: configure step returned error code 2.
A full log can be found at /home/runner/work/pyzmq/pyzmq/.mesonpy-ycdea0r2/meson-logs/meson-log.txt
try switching build system to meson, which lets us bundle 'true' builds of libzmq/libsodium.
builds on #1903, because that's why we need it, since libsodium becomes a dependency of bundled libzmq due to the removal of libzmq's tweetnacl.
So far, the simple Cython + CPython on linux/mac is working
TODO:
meson discussion