◐ Shell
clean mode source ↗

gh-116043: Simplify HACL* build by msprotz · Pull Request #119320 · python/cpython

@msprotz Thanks for looking into it and fixing it.
Unfortunately it is somehow hard to test it for me, or could you give me some hints? Currently I am using Ubuntu 24.04 standard python 3.12 installation...

However, I can give you detailed but easy instructions to test it on your fixed python installation (you just have to apdapt your path to the python installation containing the PR):

First we create a simple python program. Using hashlib or not I think plays no role. However, we take the following one:

import hashlib

print("Hello, World!")

m = hashlib.sha256()
m.update(b"nobody inspects")
print(m.hexdigest())

Then we do the follwing steps:

$ ls
helloworld.py
$ /usr/bin/python3 helloworld.py
Hello, World!
5880e257e70b83842737244b412a2f282e0f230953027a22104efc615d90d3f9
$ /usr/share/doc/python3.12/examples/freeze/freeze.py -o frozen helloworld.py
$ cd frozen
$ #mkdir -p Modules/_hacl; touch Modules/_hacl/libHacl_Hash_SHA2.a # should not be necessary any more
$ make
$ ./helloworld
Hello, World!
5880e257e70b83842737244b412a2f282e0f230953027a22104efc615d90d3f9

If make runs through without errors and creates the helloworld binary then everthing should be all right.

Sorry for the late reply.