Accepting request 568851 from devel:languages:python

- Add condition around the python2 code to make sure we can build
  in python3 only enviroment

OBS-URL: https://build.opensuse.org/request/show/568851
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-jsonschema?expand=0&rev=16
This commit is contained in:
Dominique Leuenberger 2018-01-26 12:38:41 +00:00 committed by Git OBS Bridge
commit f681b793c3
2 changed files with 16 additions and 11 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jan 24 10:24:27 UTC 2018 - tchvatal@suse.com
- Add condition around the python2 code to make sure we can build
in python3 only enviroment
-------------------------------------------------------------------
Wed Apr 19 22:13:57 UTC 2017 - toddrme2178@gmail.com

View File

@ -1,7 +1,7 @@
#
# spec file for package python-jsonschema
#
# 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-jsonschema
Version: 2.6.0
Release: 0
@ -25,21 +26,20 @@ License: MIT
Group: Development/Languages/Python
Url: http://github.com/Julian/jsonschema
Source: https://files.pythonhosted.org/packages/source/j/jsonschema/jsonschema-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module vcversioner >= 2.16.0.0}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if %{with python2}
BuildRequires: python2-functools32
# Test build requirements
BuildRequires: python2-mock
%endif
Requires(post): update-alternatives
Requires(preun): update-alternatives
BuildArch: noarch
%ifpython2
Requires: python-functools32
%endif
Requires(post): update-alternatives
Requires(preun): update-alternatives
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
@ -69,7 +69,6 @@ for Python (supporting 2.6+ including Python 3).
%python_uninstall_alternative jsonschema
%files %{python_files}
%defattr(-,root,root,-)
%doc COPYING README.rst
%python_alternative %{_bindir}/jsonschema
%{python_sitelib}/*