conda-forge / python-feedstock

A conda-smithy repository for python.
BSD 3-Clause "New" or "Revised" License
46 stars 105 forks source link

Force siphash24 hash algorithm when cross-compiling #719

Open gmarkall opened 2 months ago

gmarkall commented 2 months ago

When cross-compiling, the hash function is forced to be FNV because the configure script defines HAVE_ALIGNED_REQUIRED which is then used by pyhash.h to change the default to FNV (see #718).

This PR fixes the issue by specifying siphash24 to the configure script when cross-compiling. With this PR, I now get:

$ python -c "import sys; print(sys.hash_info.algorithm)"
siphash24

instead of

$ python -c "import sys; print(sys.hash_info.algorithm)"
fnv

I'm not that familiar with the setup of this feedstock so I don't know if this is an appropriate solution or more of a sketch of a solution - any feedback / guidance is appreciated!

Checklist

gmarkall commented 2 months ago

@conda-forge-admin, please rerender

github-actions[bot] commented 2 months ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

isuruf commented 2 months ago

Can you add a test?