python-hyperscan icon indicating copy to clipboard operation
python-hyperscan copied to clipboard

Please consider making wheels buildable without manually having to install hyperscan

Open bdraco opened this issue 10 months ago • 3 comments

Right now we can't use this package because I can't build wheels for it for Home Assistant as the build system can't do custom builds.

Perhaps a PEP 517 build backend that takes care of getting the hyperscan sources could be added.

Thanks

bdraco avatar Feb 06 '25 17:02 bdraco

this is in work, will be moving to scikit-build-core as the build system; although the latest release should be statically linked to HS for at least manylinux/musllinux compatible systems, so it shouldn't require building Hyperscan if you install the binary wheels

darvid avatar Feb 06 '25 19:02 darvid

Thanks. We need to build wheels for some old odd arches or armhf since some users have very old RPis

bdraco avatar Feb 06 '25 19:02 bdraco

would you mind trying to build with cibuildwheel from the feat/156-windows-support branch? see: https://github.com/darvid/python-hyperscan/issues/156#issuecomment-2640881988

e.g.

pipx install cibuildwheel
cibuildwheel --only=cp313-manylinux_x86_64  # or whatever platform tag

just pushed to that branch with scikit-build, and an initial CMakelists that pulls in all the necessary build-time deps (hyperscan on Windows, vectorscan otherwise; PCRE, ragel, boost) to avoid any build environment setup beyond just the toolchain.

for now this means (and hopefully none of these broke as a result, which is what i'm attempting to test):

  • chimera support on all platforms
  • statically linked to hyperscan/vectorscan on all platforms
  • statically linked to MSVC on Windows
  • statically linked to libstdc++ on musllinux

appreciate your feedback, I imagine there will be some changes required to support odd architectures like you mentioned as I only focused on manylinux/musllinux/win32/macOS for the moment.

darvid avatar Feb 06 '25 20:02 darvid