From 4b5b6f38ef32b2d8d2ed8cb12c25f0d154fe3de6 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Fri, 24 Mar 2023 10:42:53 +0000 Subject: automatic import of rpkg --- rpkg.spec | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/rpkg.spec b/rpkg.spec index 3d8a888..319eef2 100644 --- a/rpkg.spec +++ b/rpkg.spec @@ -12,6 +12,7 @@ Source0: https://pagure.io/releases/rpkg/%{name}-%{version}.tar.gz %global with_python2 0 # Enable python3 build by default %global with_python3 1 +%global with_check 0 # This is intended for Python 3 only, hence also no Python version in the name. %global __pytest /usr/bin/pytest%(test %{python3_pkgversion} == 3 || echo -%{python3_version}) @@ -219,15 +220,16 @@ example_cli_dir=$RPM_BUILD_ROOT%{_datadir}/%{name}/examples/cli %{__install} -p -m 0644 etc/rpkg/rpkg.conf ${example_cli_dir}%{_sysconfdir}/rpkg # need to run check as non-root -#%check -#%if 0%{?with_python2} -#%{__python2} -m nose tests -#%endif - -#%if 0%{?with_python3} -#%pytest -#%endif +%check +%if 0%{?with_check} +%if 0%{?with_python2} +%{__python2} -m nose tests +%endif +%if 0%{?with_python3} +%pytest +%endif +%endif %if 0%{?with_python2} %files -n python2-%{name} -- cgit v1.2.3