[packages/python-backports.unittest_mock] - updated to 1.2.1
qboosh
qboosh at pld-linux.org
Sun Mar 19 11:43:01 CET 2017
commit 40337fd264b84d2cf3a3217636cd94498d171d77
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Mar 19 11:45:18 2017 +0100
- updated to 1.2.1
python-backports.unittest_mock.spec | 51 +++++++++++++++++++++++--------------
1 file changed, 32 insertions(+), 19 deletions(-)
---
diff --git a/python-backports.unittest_mock.spec b/python-backports.unittest_mock.spec
index d68f8bc..aa0d4d6 100644
--- a/python-backports.unittest_mock.spec
+++ b/python-backports.unittest_mock.spec
@@ -1,46 +1,51 @@
#
# Conditional build:
-%bcond_without doc # don't build doc
-%bcond_without tests # do not perform "make test"
+%bcond_without doc # Sphinx documentation
+%bcond_without tests # py.test tests
%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
Summary: Make mock available as unittest.mock regardless of Python version
Summary(pl.UTF-8): Udostępnienie modułu mock jako unittest.mock niezależnie od wersji Pythona
Name: python-backports.unittest_mock
-Version: 1.1.1
-Release: 3
+Version: 1.2.1
+Release: 1
License: MIT
Group: Libraries/Python
-#Source0Download: https://pypi.python.org/pypi/backports.unittest_mock
-Source0: https://pypi.python.org/packages/source/b/backports.unittest_mock/backports.unittest_mock-%{version}.tar.gz
-# Source0-md5: 6ee907f7d8e35df16a06268e65d28e5f
+#Source0Download: https://pypi.python.org/simple/backports.unittest_mock
+Source0: https://files.pythonhosted.org/packages/source/b/backports.unittest_mock/backports.unittest_mock-%{version}.tar.gz
+# Source0-md5: f7f129ad8734c5837f66fdd880938ec4
URL: https://pypi.python.org/pypi/backports.unittest_mock
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
%if %{with python2}
-BuildRequires: python-mock
-BuildRequires: python-modules >= 1:2.7
+BuildRequires: python-modules >= 1:2.6
%if %{with tests}
+BuildRequires: python-mock
BuildRequires: python-pytest >= 2.8
-BuildRequires: python-pytest-runner
%endif
BuildRequires: python-setuptools
-BuildRequires: python-setuptools_scm >= 1.9
+BuildRequires: python-setuptools_scm >= 1.15.0
%endif
%if %{with python3}
-BuildRequires: python3-modules >= 1:3.3
+BuildRequires: python3-modules >= 1:3.2
%if %{with tests}
+%if "%{py3_ver}" < "3.3"
+BuildRequires: python3-mock
+%endif
BuildRequires: python3-pytest >= 2.8
-BuildRequires: python3-pytest-runner
%endif
BuildRequires: python3-setuptools
-BuildRequires: python3-setuptools_scm >= 1.9
+BuildRequires: python3-setuptools_scm >= 1.15.0
BuildRequires: sed >= 4.0
%endif
+%if %{with doc}
+BuildRequires: sphinx-pdg
+BuildRequires: python3-rst.linker
+%endif
Requires: python-backports
Requires: python-mock
-Requires: python-modules >= 1:2.7
+Requires: python-modules >= 1:2.6
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -62,7 +67,7 @@ unittest.mock.
Summary: Make mock available as unittest.mock regardless of Python version
Summary(pl.UTF-8): Udostępnienie modułu mock jako unittest.mock niezależnie od wersji Pythona
Group: Libraries/Python
-Requires: python3-modules >= 1:3.3
+Requires: python3-modules >= 1:3.2
%description -n python3-backports.unittest_mock
This module provides a function "install()" which makes the "mock"
@@ -94,15 +99,21 @@ Dokumentacja API modułu backports.unittest_mock.
%build
%if %{with python2}
-%py_build %{?with_tests:test}
+%py_build
+
+%{?with_tests:%{__python} -m pytest tests}
%endif
%if %{with python3}
-%py3_build %{?with_tests:test}
+%py3_build
+
+%{?with_tests:%{__python3} -m pytest tests}
%endif
%if %{with doc}
+TOPDIR=$(pwd)
cd docs
+PYTHONPATH=$TOPDIR \
sphinx-build -b html . html
%{__rm} -r html/_sources
%endif
@@ -119,9 +130,11 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python3}
%py3_install
+%if "%{py3_ver}" >= "3.3"
# pythonegg dependency generator resolves dependencies using python version running
# the generator; avoid unwanted python3egg(mock) dependency
-%{__sed} -i '/^\[:python_version=="2\.7"\]$/,/^mock$/ d' $RPM_BUILD_ROOT%{py3_sitescriptdir}/backports.unittest_mock-%{version}-py*.egg-info/requires.txt
+%{__sed} -i '/^\[:python_version=="2\.7"/,/^mock$/ d' $RPM_BUILD_ROOT%{py3_sitescriptdir}/backports.unittest_mock-%{version}-py*.egg-info/requires.txt
+%endif
%endif
%clean
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-backports.unittest_mock.git/commitdiff/40337fd264b84d2cf3a3217636cd94498d171d77
More information about the pld-cvs-commit
mailing list