%global __tar /opt/freeware/bin/tar #%{!?dotests: %define dotests 1} %define name python3-cryptography %define srcname cryptography %define version 3.4.7 %define release 1 %define is_python %(test -e /opt/freeware/bin/python3_32 && echo 1 || echo 0) %if %{is_python} %define python_sitelib %(python3_32 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))") %endif %define _libdir64 %{_prefix}/lib64 %define is_python_64 %(test -e /opt/freeware/bin/python3_64 && echo 1 || echo 0) %if %{is_python_64} %define python_sitelib64 %(python3 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))") %endif Summary: A small but fast and easy to use stand-alone template engine written in pure python. Name: %{name} Version: %{version} Release: %{release} Source0: %{srcname}-%{version}.tar.gz License: BSD Group: Development/Libraries Prefix: %{_prefix} BuildArch: ppc Vendor: Armin Ronacher Url: https://pypi.org BuildRequires: python3 >= 3.7.9, python3-devel >= 3.7.9, python3-hypothesis >= 4.47.4 Requires: python3-cffi >= 0.13.2 Requires: python3-six >= 1.13.0 #for running test cases pip install cryptography_vectors, iso8601, pretend, sortedcontainers %description cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. %prep %setup -q -n %{srcname}-%{version} %build export CC="gcc -O2" export OBJECT_MODE=64 export CFLAGS="-maix64" export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib" export CRYPTOGRAPHY_DONT_BUILD_RUST=1 #export OPENSSL_DIR="-L/usr/lib -lssl" #export OPENSSL_CFLAGS="-I/usr/include/openssl" python3 setup.py build %install [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT python3 setup.py install --skip-build --root ${RPM_BUILD_ROOT} if [ "%{dotests}" == 1 ] then (PYTHONPATH=%{buildroot}%{python_sitelib64} python3 -m pytest -k "not (test_buffer_protocol_alternate_modes or test_dh_parameters_supported or test_load_ecdsa_no_named_curve)" || true) fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc CHANGELOG.rst CONTRIBUTING.rst LICENSE LICENSE.APACHE LICENSE.BSD LICENSE.PSF PKG-INFO README.rst %doc docs/*.rst %{python_sitelib64}/* %changelog * Thu Jun 10 2021 Rishita Saha - 3.4.7-1 - Update to fix CVE-2020-36242 and CVE-2020-25659 * Wed Aug 28 2019 Baanu Tumma - 2.8-1 - Updated to latest version, built using python3 * Tue May 9 2017 Ravi Hirekurabar - 1.8.1-1 - - first version for AIX V6.1 and higher