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
This commit is contained in:
parent
07ca7a3be9
commit
c8d84e85b7
@ -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
|
Wed Oct 11 14:45:16 UTC 2017 - mpluskal@suse.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pytest-mock
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,8 +16,10 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define oldpython python
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%define modname pytest-mock
|
%define modname pytest-mock
|
||||||
|
%bcond_without python2
|
||||||
Name: python-%{modname}
|
Name: python-%{modname}
|
||||||
Version: 1.6.3
|
Version: 1.6.3
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -25,26 +27,22 @@ Summary: Thin-wrapper around the mock package for easier use with pytest
|
|||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Url: https://github.com/pytest-dev/%{modname}
|
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 pytest}
|
||||||
BuildRequires: %{python_module setuptools_scm}
|
BuildRequires: %{python_module setuptools_scm}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
%if 0%{?suse_version} < 1330
|
|
||||||
BuildRequires: python-mock
|
|
||||||
%else
|
|
||||||
BuildRequires: python2-mock
|
|
||||||
%endif
|
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-pytest
|
Requires: python-pytest
|
||||||
|
BuildArch: noarch
|
||||||
|
%if %{with python2}
|
||||||
|
BuildRequires: %{oldpython}-mock
|
||||||
|
%endif
|
||||||
%ifpython2
|
%ifpython2
|
||||||
Requires: python-mock
|
Requires: %{oldpython}-mock
|
||||||
%else
|
%else
|
||||||
Recommends: python-mock
|
Recommends: python-mock
|
||||||
%endif
|
%endif
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -68,7 +66,8 @@ of a test
|
|||||||
%python_expand rm -rf %{buildroot}%{$python_sitelib}/__pycache__
|
%python_expand rm -rf %{buildroot}%{$python_sitelib}/__pycache__
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%defattr(-,root,root,-)
|
%doc CHANGELOG.rst
|
||||||
|
%license LICENSE
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user