From c8d84e85b7a8658900c95f82694210dba60c2a72a4c6f70264fc5d38f0e1a1e1 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Tue, 16 Jan 2018 08:37:39 +0000 Subject: [PATCH] Accepting request 563590 from devel:languages:python - Fix building with python3 only available - Install properly license file/etc OBS-URL: https://build.opensuse.org/request/show/563590 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=4 --- python-pytest-mock.changes | 6 ++++++ python-pytest-mock.spec | 23 +++++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/python-pytest-mock.changes b/python-pytest-mock.changes index 8058bce..d14348c 100644 --- a/python-pytest-mock.changes +++ b/python-pytest-mock.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 11 12:23:03 UTC 2018 - tchvatal@suse.com + +- Fix building with python3 only available +- Install properly license file/etc + ------------------------------------------------------------------- Wed Oct 11 14:45:16 UTC 2017 - mpluskal@suse.com diff --git a/python-pytest-mock.spec b/python-pytest-mock.spec index 74a2693..8019086 100644 --- a/python-pytest-mock.spec +++ b/python-pytest-mock.spec @@ -1,7 +1,7 @@ # # spec file for package python-pytest-mock # -# 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 @@ -16,8 +16,10 @@ # +%define oldpython python %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define modname pytest-mock +%bcond_without python2 Name: python-%{modname} Version: 1.6.3 Release: 0 @@ -25,26 +27,22 @@ Summary: Thin-wrapper around the mock package for easier use with pytest License: MIT Group: Development/Languages/Python Url: https://github.com/pytest-dev/%{modname} -Source: https://files.pythonhosted.org/packages/source/p/%{modname}/%{modname}-%{version}.tar.gz +Source: https://files.pythonhosted.org/packages/source/p/pytest-mock/%{modname}-%{version}.tar.gz BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} BuildRequires: fdupes -%if 0%{?suse_version} < 1330 -BuildRequires: python-mock -%else -BuildRequires: python2-mock -%endif BuildRequires: python-rpm-macros Requires: python-pytest +BuildArch: noarch +%if %{with python2} +BuildRequires: %{oldpython}-mock +%endif %ifpython2 -Requires: python-mock +Requires: %{oldpython}-mock %else Recommends: python-mock %endif -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildArch: noarch - %python_subpackages %description @@ -68,7 +66,8 @@ of a test %python_expand rm -rf %{buildroot}%{$python_sitelib}/__pycache__ %files %{python_files} -%defattr(-,root,root,-) +%doc CHANGELOG.rst +%license LICENSE %{python_sitelib}/* %changelog