%bcond_with dotests %global __tar /opt/freeware/bin/tar %global py_minor 16 %global py_major 3.9 %global python_major python%{py_major} %global pkgname cryptography %global meta_package python3-%{pkgname} %global python3_sitearch64 %(%{python_major} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") Name: %{python_major}-%{pkgname} Version: 3.4.7 Release: 3 Summary: A small but fast and easy to use stand-alone template engine written in pure python. License: BSD URL: https://pypi.python.org/pypi/%{pkgname} Source0: https://files.pythonhosted.org/packages/source/c/%{pkgname}/%{pkgname}-%{version}.tar.gz BuildArch: ppc BuildRequires: %{python_major}-setuptools-rust >= 0.12.1 BuildRequires: %{python_major}-hypothesis >= 4.47.4 BuildRequires: %{python_major}-devel >= %{py_major}.%{py_minor} BuildRequires: %{python_major}-setuptools >= 65.2.0 BuildRequires: %{python_major}-semantic_version >= 2.8.5 BuildRequires: %{python_major}-cffi >= 1.13.2 Requires: %{python_major} >= %{py_major}.%{py_minor} Requires: python3.9-cffi >= 1.13.2 Requires: python3.9-six >= 1.13.0 %description cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. %package -n %{meta_package} Summary: Meta-package for %{name} Requires: python3 >= %{py_major}.%{py_minor} Requires: %{name} = %{version}-%{release} %description -n %{meta_package} This is a Meta-package for %{name} package. %prep %autosetup -n %{pkgname}-%{version} %build export CC="gcc -O2" export OBJECT_MODE=64 export CFLAGS="-maix64 -DOPENSSL_NO_PSK" 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 PATH=/opt/freeware/bin:$PATH %{python_major} setup.py build %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %{python_major} setup.py install --root %{buildroot} %check %if %{with dotests} #python3 -m venv python_venv #. ./python_venv/bin/activate #pip3 install pytest #pip3 install hypothesis #ulimit -d unlimited #ulimit -n unlimited #ulimit -m unlimited # ulimit -f unlimited #( python runtests.py -m 'full' -v || true ) #deactivate %endif %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %license LICENSE LICENSE.APACHE LICENSE.BSD LICENSE.PSF %doc CHANGELOG.rst CONTRIBUTING.rst PKG-INFO README.rst %doc docs/*.rst %{python3_sitearch64}/* %files -n %{meta_package} %defattr(-,root,system,-) %changelog * Mon Jan 10 Tue 2023 Sangeetha Bandi - 3.4.7-3 - cryptography for python3.9 * Mon Jan 09 2023 Ayappan P -3.4.7-2 - Rebuild with openssl 1.1.2.X fileset * 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