diff options
| -rw-r--r-- | rpkg.spec | 18 | 
1 files changed, 10 insertions, 8 deletions
@@ -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}  | 
