python-cryptography/python-cryptography.spec
Tomáš Chvátal 2f7c228585 Accepting request 234746 from home:matejcik:branches:devel:languages:python
- update to 0.4
    * added IDEA algorithm
    * added HOTP, TOTP and CMAC primitives
    * improved support for RSA and DSA public key cryptography
- include cryptography_vectors as a source, in order to run the full
  test suite (cryptography_vectors seems only useful for testing
  this module, so it's probably not worth making a separate installable
  package for it)
- drop upstreamed cryptography-custom-install-cmd.patch

OBS-URL: https://build.opensuse.org/request/show/234746
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cryptography?expand=0&rev=4
2014-05-28 08:39:17 +00:00

97 lines
3.4 KiB
RPMSpec

#
# 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.4
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
Source3: https://pypi.python.org/packages/source/c/cryptography/cryptography_vectors-%{version}.tar.gz
Source4: https://pypi.python.org/packages/source/c/cryptography/cryptography_vectors-%{version}.tar.gz.asc
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-pyasn1
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}
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
#TODO(saschpe): Failing on SP3, debug later:
rm tests/hazmat/primitives/test_rsa.py
%endif
# prepare vectors module
tar xvzf %{S:3}
mv cryptography_vectors-%{version}/cryptography_vectors .
%build
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
# do not install cryptography_vectors
rm -r %{buildroot}%{python_sitearch}/cryptography_vectors
%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