[packages/python-pytest-mock] - added sed variant for older setuptools

qboosh qboosh at pld-linux.org
Tue Jul 31 05:36:08 CEST 2018


commit 803d92d10c03c5a0c3e2a2c755eac5633feb4ad5
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Jul 31 05:38:09 2018 +0200

    - added sed variant for older setuptools

 python-pytest-mock.spec | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/python-pytest-mock.spec b/python-pytest-mock.spec
index 3203a46..e211b90 100644
--- a/python-pytest-mock.spec
+++ b/python-pytest-mock.spec
@@ -100,7 +100,9 @@ rm -rf $RPM_BUILD_ROOT
 %py3_install
 
 # avoid python3egg(mock) dependency (mock required only for python 2.x)
-%{__sed} -i -e '/\[:python_version *< *"3.*\]/,/^mock$/d' $RPM_BUILD_ROOT%{py3_sitescriptdir}/pytest_mock-%{version}-py*.egg-info/requires.txt
+# (two different notations depending on setuptools version)
+%{__sed} -i -e '/\[:python_version *< *"3.*\]/,/^mock$/d' \
+	-e '/^mock;python_version<"3\.0"/d' $RPM_BUILD_ROOT%{py3_sitescriptdir}/pytest_mock-%{version}-py*.egg-info/requires.txt
 %endif
 
 %clean
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pytest-mock.git/commitdiff/803d92d10c03c5a0c3e2a2c755eac5633feb4ad5



More information about the pld-cvs-commit mailing list