- Add proper conditional for the python2, the ifpython works only

for the requires/etc

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cryptography?expand=0&rev=83
This commit is contained in:
Tomáš Chvátal 2018-01-18 13:31:34 +00:00 committed by Git OBS Bridge
parent 2a021588d7
commit cf6137bc31
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
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

View File

@ -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
@ -102,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}
@ -117,7 +117,6 @@ $python -m pytest tests
# finish
deactivate
}
%endif
%files %{python_files}
%doc LICENSE LICENSE.APACHE LICENSE.BSD