I had that problem in python 3 before ibm packaged it in rpm form. I can’t find it off hand and I don’t remember if it was here or on Ryver but Massimo gave me a make script. I had to change a compile flag in gcc to get it to work before. When I get back to the office Monday I will find it and post it.

Get Outlook for iOS<https://aka.ms/o0ukef>
From: OpenSource <opensource-bounces@xxxxxxxxxxxxxxxxxx> on behalf of Pete Helgren <pete@xxxxxxxxxx>
Sent: Saturday, November 2, 2019 1:43:26 PM
To: IBMi Open Source Roundtable <opensource@xxxxxxxxxxxxxxxxxx>
Subject: [IBMiOSS] Building cryptography for python2

CAUTION: External email. Do not open attachments or click links.
Forward suspicious emails to Anti-Spam.

I see that python3 has the cryptography library but not python2 . I am
on V7R4 and python 2.7.17 installed through the Open Source Package
manager (the only way OSS has been installed on this machine). I get
the following error:

bash-4.4$ pip2 install cryptography
DEPRECATION: Python 2.7 will reach the end of its life on January 1st,
2020. Please upgrade your Python as Python 2.7 won't be maintained after
that date. A future version of pip will drop support for Python 2.7.
More details about Python 2 support in pip, can be found at
Collecting cryptography
Using cached
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: /QOpenSys/pkgs/bin/python2
prepare_metadata_for_build_wheel /tmp/tmpV3U20Q
cwd: /tmp/pip-install-CW5LUD/cryptography
Complete output (41 lines):
Traceback (most recent call last):
line 257, in <module>
line 240, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
line 110, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
line 156, in prepare_metadata_for_build_wheel
line 142, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 275, in <module>
line 145, in setup
return distutils.core.setup(**attrs)
File "/QOpenSys/pkgs/lib/python2.7/distutils/core.py", line 111,
in setup
_setup_distribution = dist = klass(attrs)
line 447, in __init__
k: v for k, v in attrs.items()
File "/QOpenSys/pkgs/lib/python2.7/distutils/dist.py", line 287,
in __init__
line 735, in finalize_options
ep.load()(self, ep.name, value)
line 217, in cffi_modules
add_cffi_module(dist, cffi_module)
line 49, in add_cffi_module
execfile(build_file_name, mod_vars)
line 25, in execfile
exec(code, glob, glob)
File "src/_cffi_src/build_openssl.py", line 106, in <module>
File "src/_cffi_src/utils.py", line 57, in build_ffi_for_binding
File "src/_cffi_src/utils.py", line 65, in build_ffi
ffi = FFI()
line 48, in __init__
import _cffi_backend as backend
ImportError: Could not load module
The local-exec model was used for thread-local
storage, but the module is not the main program.
Examine the .loader section header with the 'dump -Hv' command.
ERROR: Command errored out with exit status 1:
prepare_metadata_for_build_wheel /tmp/tmpV3U20Q Check the logs for full
command output.

Searches turned up nothing useful.cffi is installed: (with "pip2 install
cffi") just can't quite sort out what the error is trying to tell me
except that _cffi_backend.so shared object isn't found.

Pete Helgren
GIAC Secure Software Programmer-Java
Twitter - Sys_i_Geek IBM_i_Geek

This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/opensource.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
NOTICE: This electronic mail message and any files transmitted with it are intended
exclusively for the individual or entity to which it is addressed. The message,
together with any attachment, may contain confidential and/or privileged information.
Any unauthorized review, use, printing, saving, copying, disclosure or distribution
is strictly prohibited. If you have received this message in error, please
immediately advise the sender by reply email and delete all copies.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.