Accepting request 567426 from devel:languages:python

- Add proper conditional for the python2, the ifpython works only
  for the requires/etc

- add missing dependency on python ssl

OBS-URL: https://build.opensuse.org/request/show/567426
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cryptography?expand=0&rev=34
This commit is contained in:
Dominique Leuenberger 2018-01-20 10:26:01 +00:00 committed by Git OBS Bridge
commit 3f4a0d6078
2 changed files with 16 additions and 4 deletions

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Thu Jan 18 13:30:12 UTC 2018 - tchvatal@suse.com
- Add proper conditional for the python2, the ifpython works only
for the requires/etc
-------------------------------------------------------------------
Tue Jan 16 10:14:37 UTC 2018 - dmueller@suse.com
- add missing dependency on python ssl
-------------------------------------------------------------------
Fri Dec 8 18:04:13 UTC 2017 - arun@gmx.de

@ -1,7 +1,7 @@
#
# spec file for package python-cryptography
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,6 +17,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-cryptography
Version: 2.1.4
Release: 0
@ -52,7 +53,7 @@ Requires: python-pyasn1 >= 0.1.8
Requires: python-setuptools >= 11.3
Requires: python-six >= 1.4.1
%requires_eq python-cffi
%ifpython2
%if %{with python2}
BuildRequires: python2-enum34
BuildRequires: python2-ipaddress
%endif
@ -66,6 +67,8 @@ BuildRequires: %{python_module pytest}
BuildRequires: %{python_module virtualenv}
# /SECTION
%ifpython2
# python-base is not enough, we need the _ssl module
Requires: python
Requires: python-enum34
Requires: python-ipaddress
%endif
@ -100,7 +103,6 @@ export CFLAGS="%{optflags} -fno-strict-aliasing"
%fdupes %{buildroot}%{_prefix}
%check
%if 0%{?suse_version} >= 1210
%{python_expand # this is going to be fun
# create virtualenv
$python %{_bindir}/virtualenv --system-site-packages TESTROOT-%{$python_bin_suffix}
@ -115,7 +117,6 @@ $python -m pytest tests
# finish
deactivate
}
%endif
%files %{python_files}
%doc LICENSE LICENSE.APACHE LICENSE.BSD