forked from pool/python-cryptography
Accepting request 223686 from home:mvyskocil:branches:devel:languages:python
add package to d:l:p, needed for new pyOpenSSL OBS-URL: https://build.opensuse.org/request/show/223686 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cryptography?expand=0&rev=1
This commit is contained in:
93
python-cryptography.spec
Normal file
93
python-cryptography.spec
Normal file
@@ -0,0 +1,93 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%if 0%{suse_version} && 0%{?suse_version} >= 1220
|
||||
BuildRequires: gpg-offline
|
||||
%endif
|
||||
BuildRequires: pkgconfig(python2)
|
||||
BuildRequires: pkgconfig(openssl)
|
||||
BuildRequires: pkgconfig(libffi)
|
||||
BuildRequires: python-cffi >= 0.8
|
||||
BuildRequires: python-six >= 1.4.1
|
||||
BuildRequires: python-setuptools
|
||||
#test requirements
|
||||
BuildRequires: python-pytest
|
||||
|
||||
Requires: python-cffi >= 0.8
|
||||
Requires: python-six >= 1.4.1
|
||||
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True)")}
|
||||
%{!?py_ver: %global py_ver %(python -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND)}
|
||||
%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}
|
||||
|
||||
%build
|
||||
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
|
||||
#mvyskocil: FIXME somehow in setup.py
|
||||
if [ "%{python_sitelib}" != "%{python_sitearch}" ]; then
|
||||
mkdir -p %{buildroot}/%{python_sitearch}/
|
||||
mv %{buildroot}/%{python_sitelib}/cryptography* %{buildroot}/%{python_sitearch}/
|
||||
rm -rf %{buildroot}/%{python_sitelib}/
|
||||
fi
|
||||
|
||||
#mvyskocil: FIXME, modules iso8601 and pretend are needed to run tests
|
||||
#%check
|
||||
#py.test tests/
|
||||
|
||||
%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
|
Reference in New Issue
Block a user