# # spec file for package python-cryptography # # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: python-cryptography Version: 0.2.1 Release: 0 Url: https://cryptography.io/en/latest/ Summary: Python library which exposes cryptographic recipes and primitives License: Apache-2.0 Group: Development/Languages/Python Source0: https://pypi.python.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz Source1: https://pypi.python.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz.asc Source2: %{name}.keyring # PATCH-FIX-UPSTREAM speilicke@suse.com -- Backport of https://github.com/pyca/cryptography/pull/872 Patch0: cryptography-custom-install-cmd.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{suse_version} && 0%{?suse_version} >= 1220 BuildRequires: gpg-offline %endif BuildRequires: libopenssl-devel BuildRequires: python-cffi >= 0.8 BuildRequires: python-devel BuildRequires: python-setuptools BuildRequires: python-six >= 1.4.1 # Test requirements BuildRequires: python-iso8601 BuildRequires: python-pretend BuildRequires: python-pytest Requires: python-cffi >= 0.8 Requires: python-six >= 1.4.1 %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} BuildRequires: libffi43-devel %else BuildRequires: pkgconfig(libffi) %endif %description cryptography is a package designed to expose cryptographic recipes and primitives to Python developers. Our goal is for it to be your "cryptographic standard library". It supports Python 2.6-2.7, Python 3.2+, and PyPy. cryptography includes both high level recipes, and low level interfaces to common cryptographic algorithms such as symmetric ciphers, message digests and key derivation functions. %prep %if 0%{suse_version} && 0%{?suse_version} >= 1220 %gpg_verify %{SOURCE1} %endif %setup -q -n cryptography-%{version} %patch0 -p1 %if 0%{?suse_version} && 0%{?suse_version} <= 1110 #TODO(saschpe): Failing on SP3, debug later: rm tests/hazmat/primitives/test_rsa.py %endif %build CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} %check py.test %files %defattr(-,root,root,-) %doc AUTHORS.rst CONTRIBUTING.rst LICENSE README.rst %{python_sitearch}/cryptography/ %{python_sitearch}/cryptography-%{version}-py%{py_ver}.egg-info/ %changelog