#%{!?dotests: %define dotests 1} %define name python3-cryptography %define srcname cryptography %define version 2.8 %define release 1 %define is_python %(test -e /usr/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 /usr/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 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: ppc Vendor: Armin Ronacher Url: https://pypi.org BuildRequires: python3 >= 3.7.4, python3-devel >= 3.7.4, 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 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 AUTHORS.rst CHANGELOG.rst LICENSE PKG-INFO README.rst %doc docs/*.rst %{python_sitelib64}/* %changelog * 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