2014-02-24 15:01:28 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-cryptography
|
|
|
|
#
|
2015-04-07 15:10:50 +02:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2014-02-24 15:01:28 +01:00
|
|
|
#
|
|
|
|
# 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
|
2015-08-24 10:43:13 +02:00
|
|
|
Version: 1.0
|
2014-02-24 15:01:28 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Python library which exposes cryptographic recipes and primitives
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Languages/Python
|
2014-12-29 19:15:46 +01:00
|
|
|
Url: https://cryptography.io/en/latest/
|
2014-02-24 15:01:28 +01:00
|
|
|
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
|
2014-05-29 15:08:57 +02:00
|
|
|
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
|
2014-04-01 10:25:31 +02:00
|
|
|
BuildRequires: libopenssl-devel
|
2015-08-24 10:43:13 +02:00
|
|
|
BuildRequires: python-cffi >= 1.1.0
|
2014-04-01 10:25:31 +02:00
|
|
|
BuildRequires: python-devel
|
2014-12-29 19:15:46 +01:00
|
|
|
BuildRequires: python-enum34
|
2015-08-24 10:43:13 +02:00
|
|
|
BuildRequires: python-idna >= 2.0
|
2015-07-30 08:33:42 +02:00
|
|
|
BuildRequires: python-ipaddress
|
2014-02-24 15:01:28 +01:00
|
|
|
BuildRequires: python-setuptools
|
2014-04-01 10:25:31 +02:00
|
|
|
BuildRequires: python-six >= 1.4.1
|
2014-12-29 19:15:46 +01:00
|
|
|
BuildRequires: pkgconfig(libffi)
|
2014-04-01 10:25:31 +02:00
|
|
|
# Test requirements
|
|
|
|
BuildRequires: python-iso8601
|
|
|
|
BuildRequires: python-pretend
|
2015-08-24 10:43:13 +02:00
|
|
|
BuildRequires: python-pyasn1 >= 0.1.8
|
2014-02-24 15:01:28 +01:00
|
|
|
BuildRequires: python-pytest
|
2014-12-29 19:15:46 +01:00
|
|
|
BuildRequires: python-virtualenv
|
2015-08-24 10:43:13 +02:00
|
|
|
Requires: python-cffi >= 1.1.0
|
2014-12-29 19:15:46 +01:00
|
|
|
Requires: python-enum34
|
2015-08-24 10:43:13 +02:00
|
|
|
Requires: python-idna >= 2.0
|
2015-07-30 08:33:42 +02:00
|
|
|
Requires: python-ipaddress
|
2015-08-24 10:43:13 +02:00
|
|
|
Requires: python-pyasn1 >= 0.1.8
|
2014-04-01 10:25:31 +02:00
|
|
|
Requires: python-six >= 1.4.1
|
2014-12-29 19:15:46 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2014-02-24 15:01:28 +01:00
|
|
|
|
|
|
|
%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
|
|
|
|
%setup -q -n cryptography-%{version}
|
|
|
|
|
2014-05-28 10:39:17 +02:00
|
|
|
# prepare vectors module
|
2014-12-29 19:15:46 +01:00
|
|
|
tar xvzf %{SOURCE3}
|
2014-05-28 10:39:17 +02:00
|
|
|
|
2014-02-24 15:01:28 +01:00
|
|
|
%build
|
|
|
|
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build
|
|
|
|
|
|
|
|
%install
|
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
|
|
|
2014-04-01 10:25:31 +02:00
|
|
|
%check
|
2014-12-29 19:15:46 +01:00
|
|
|
# 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
|
2014-02-24 15:01:28 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
2014-12-29 19:15:46 +01:00
|
|
|
%doc AUTHORS.rst CONTRIBUTING.rst CHANGELOG.rst LICENSE README.rst
|
2014-02-24 15:01:28 +01:00
|
|
|
%{python_sitearch}/cryptography/
|
|
|
|
%{python_sitearch}/cryptography-%{version}-py%{py_ver}.egg-info/
|
|
|
|
|
|
|
|
%changelog
|