| Summary: | python-argon2_cffi no longer works | ||
|---|---|---|---|
| Product: | buildroot | Reporter: | Emile Cormier <emile.cormier.jr> |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | arnout, buildroot, yann.morin.1998 |
| Priority: | P5 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
| Attachments: | Snippet of the build log concerning argon2-cffi and argon2-cffi-bindings | ||
|
Description
Emile Cormier
2022-03-30 00:39:59 UTC
TL;DR: The new Python flit setup infrastructure seems to be deploying to the wrong destination directory.
-----
I see now that argon2-cffi now uses the new flit setup type. The argon2-cffi package now gets installed under
/lib/python3.10/site-packages/argon2
whereas it used to be installed under
/usr/lib/python3.10/site-packages
Here's the output of 'python -m site' on my BeagleBone Black device:
sys.path = [
'/lib/python3.10/site-packages/argon2',
'/usr/lib/python310.zip',
'/usr/lib/python3.10',
'/usr/lib/python3.10/lib-dynload',
'/usr/lib/python3.10/site-packages',
]
USER_BASE: '/root/.local' (doesn't exist)
USER_SITE: '/root/.local/lib/python3.10/site-packages' (doesn't exist)
ENABLE_USER_SITE: True
If I add /lib/python3.10/site-packages to the "real" system-wide site-packages via:
echo "/lib/python3.10/site-packages" > /usr/lib/python3.10/site-packages/extra.pth
then argon2 now appears in
python -c 'help("modules")'
and the following test command works!
# python -c 'from argon2 import PasswordHasher; print(PasswordHasher().hash("correct horse battery staple"));'
$argon2id$v=19$m=65536,t=3,p=4$CZO2H3qcZr/Vp9w0qVpLxA$eAz24Ry+cvSdRTJaPYDcf9HTc/Zyq/PmoFkFFPcQHm0
I've tracked it down to package/pkg-python.mk using /lib/python$(PYTHON3_VERSION_MAJOR)/site-packages instead of /usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages Submitted a patch via the mailing list: https://lists.buildroot.org/pipermail/buildroot/2022-March/639798.html I can import and use the argon2 module in a Python program with those changes. Emile, All, Thans for your bug report. We believe this has now been fixed with commit 5bea8c9521b3 (package/pkg-python.mk: fix PEP517 paths). Regards, Yann E. MORIN. I confirm that the PasswordHasher test works for me with the latest master. |