Open bsiegel opened 5 years ago
I was going to say that your system is missing the OpenSSL headers. But getting a --no-binary :all:
to work kinda disproves that theory.
I wonder if the OpenSSL headers location is getting picked up via a call to the Python distribution's sysconfig.get_config_var('OPENSSL_INCLUDES')
. The Python distributions that PyOxidizer uses is advertising the OpenSSL path used in its build environment. We may want to unset this variable in the Python distribution so it doesn't get wrongfully used. Looking at the build log, I see -I
paths that look like the paths that python-build-standalone
uses...
(We should also consider shipping a build environment so all this stuff just works.)
A potential workaround might be to set OPENSSL_DIR
or some other environment variable to force cryptography
's build system to pick up a specific OpenSSL version. But this is definitely a bug in python-build-standalone
that should be addressed.
See also #26.
I got it to build on my OS 10.14.5 machine with:
CFLAGS="-I$(brew --prefix openssl)/include" LDFLAGS="-L$(brew --prefix openssl)/lib" pyoxidizer build
But then when running it, got this:
Traceback (most recent call last):
File "app", line 4, in <module>
File "cryptography.fernet", line 18, in <module>
File "cryptography.hazmat.primitives.padding", line 13, in <module>
ModuleNotFoundError: No module named 'cryptography.hazmat.bindings._padding'
SystemError
Which is probably the same issue as in #26 ?
It looks like it’s failing to find the OpenSSL headers. Interestingly I can run
pip3 install "cryptography==2.7" --no-binary :all:
and it does appear to compile fine locally when I do that. When PyOxidizer attempts to compile it however, I get the following error: