diff --git a/python-jsonschema.changes b/python-jsonschema.changes index 993e500..9b870b1 100644 --- a/python-jsonschema.changes +++ b/python-jsonschema.changes @@ -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 diff --git a/python-jsonschema.spec b/python-jsonschema.spec index 72334a8..4a9a19a 100644 --- a/python-jsonschema.spec +++ b/python-jsonschema.spec @@ -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}/*