14
0

- update to 0.7.1

* backwards-incompatible change: GCM module doesn't truncate tags
      by default anymore
    * removed deprecated arguments to MFG1 constructor
    * ECC support
    * added PEM and openssh key loading convenience methods
    * support for many new ciphers and new features of existing ones
    see CHANGELOG.rst for details
- spec cleanup
- reworked %check section
- added changelog to docs

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cryptography?expand=0&rev=7
This commit is contained in:
Jan Matejek
2014-12-29 18:15:46 +00:00
committed by Git OBS Bridge
parent e70eb3fdcb
commit 50d37a3ec6
10 changed files with 65 additions and 53 deletions

View File

@@ -17,39 +17,34 @@
Name: python-cryptography
Version: 0.4
Version: 0.7.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
Url: https://cryptography.io/en/latest/
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-vectors/cryptography_vectors-%{version}.tar.gz
Source4: https://pypi.python.org/packages/source/c/cryptography-vectors/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-enum34
BuildRequires: python-setuptools
BuildRequires: python-six >= 1.4.1
BuildRequires: pkgconfig(libffi)
# Test requirements
BuildRequires: python-iso8601
BuildRequires: python-pretend
BuildRequires: python-pyasn1
BuildRequires: python-pytest
BuildRequires: python-virtualenv
Requires: python-cffi >= 0.8
Requires: python-enum34
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
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
cryptography is a package designed to expose cryptographic
@@ -63,33 +58,35 @@ 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 .
tar xvzf %{SOURCE3}
%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
# this is going to be fun
# create virtualenv
virtualenv --system-site-packages TESTROOT
. TESTROOT/bin/activate
# install package in virtualenv
python setup.py install
# install cryptography vectors
(cd cryptography_vectors-%{version} && python setup.py install)
# run tests with virtualenv'd python
# (specify "tests" directory, otherwise py.test discovers tests in virtualenv'd setuptools)
python /usr/bin/py.test tests
# finish
deactivate
%files
%defattr(-,root,root,-)
%doc AUTHORS.rst CONTRIBUTING.rst LICENSE README.rst
%doc AUTHORS.rst CONTRIBUTING.rst CHANGELOG.rst LICENSE README.rst
%{python_sitearch}/cryptography/
%{python_sitearch}/cryptography-%{version}-py%{py_ver}.egg-info/