Closed mouse07410 closed 4 years ago
This fix to the source code allows it to compile:
diff --git a/sources/common/randombytes.h b/sources/common/randombytes.h
index 37353cc..1a2a52f 100644
--- a/sources/common/randombytes.h
+++ b/sources/common/randombytes.h
@@ -5,7 +5,12 @@
#ifdef _WIN32
#include <CRTDEFS.H>
#else
+#ifdef __APPLE__
+#include <stdlib.h>
+#include <stddef.h>
+#else /* __APPLE__ */
#include <unistd.h>
+#endif /* __APPLE__ */
#endif
int randombytes(uint8_t *buf, size_t n);
Unfortunately, your README does not tell how to build/install from the local source tree, and until you apply and push the above fix - it won't even compile on Mac.
Thanks for bringing this up; could you confirm that it builds succesfully now? I have updated the README as requested.
Thank you! I confirm that the current pqcrypto
builds and installs from PyPI fine.
One more thing: for those proficient with Poetry, it's obvious that poetry build
places the "wheel" in the dist/
subdirectory. Those who never touched that tool though - like myself - are stymied.
May I suggest one more enhancement for the README, something like:
# Using poetry
pip install poetry
poetry build
pip install dist/*.whl
and/or a few words about what poetry build
produces, and how to actually get the resulting wheel installed and usable outside of the poetry
environment.
Thanks!
macOS 10.15.6, Xcode-11.7, Python-3.8.5.