From c610de0120c4554924e4b5b579d2db9b0d125a03debcf04a0513d629e58d32c6 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Fri, 22 Jan 2021 07:05:37 +0000 Subject: [PATCH] fix py OBS-URL: https://build.opensuse.org/package/show/devel:tools/b4?expand=0&rev=36 --- b4.spec | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/b4.spec b/b4.spec index d2e29ae..fa1a70b 100644 --- a/b4.spec +++ b/b4.spec @@ -16,8 +16,6 @@ # -%define skip_python2 1 -%define skip_python36 1 %define version_unconverted 0.6.2+4 Name: b4 Version: 0.6.2+4 @@ -29,8 +27,10 @@ URL: https://git.kernel.org/pub/scm/utils/b4/b4.git Source0: %{name}-%{version}.tar.xz Patch0: 0001-lift-requests-version-requirement.patch BuildArch: noarch -BuildRequires: %{python_module requests} -BuildRequires: %{python_module setuptools} +# for checks +BuildRequires: git-core +BuildRequires: python3-requests +BuildRequires: python3-setuptools Requires: python3-dkimpy >= 1.0.5 Requires: python3-dnspython >= 2.0.0 Requires: python3-requests >= 2.24.0 @@ -51,17 +51,20 @@ precursor to Lore and Data in the Star Trek universe. sed -i.old '1{/#!.*/d}' b4/*.py %build -%python_build +%python3_build %install -%python_install +%python3_install mv %{buildroot}/%{_mandir}/man5 %{buildroot}/%{_mandir}/man.5 %check -%python_exec setup.py check +python3 setup.py check export PYTHONPATH="./" -%python_exec ./b4/command.py --version >check_version -echo %version | grep "`cat check_version`" +THEIRS=`python3 ./b4/command.py --version` +OURS=`sed -n "s/__VERSION__ = '\(.*\)'/\1/p" b4/__init__.py` +test "$THEIRS" = "$OURS" +python3 ./b4/command.py --help |grep -q 'mbox,am,attest' +python3 ./b4/command.py mbox abc |& grep -q 'Looking up https://lore.kernel.org/r/abc' %files %doc README.rst