From 45d478d6a56c16bc9766ea6481e4f4aeab83e0d5 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Fri, 24 Mar 2023 08:33:37 +0000 Subject: automatic import of rpkg --- rpkg.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rpkg.spec b/rpkg.spec index 35f46f8..bf70572 100644 --- a/rpkg.spec +++ b/rpkg.spec @@ -13,6 +13,15 @@ Source0: https://pagure.io/releases/rpkg/%{name}-%{version}.tar.gz # Enable python3 build by default %global with_python3 1 +# 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}) +%global pytest %{expand:\\\ + CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ + PATH="%{buildroot}%{_bindir}:$PATH"\\\ + PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}"\\\ + PYTHONDONTWRITEBYTECODE=1\\\ + %{?__pytest_addopts:PYTEST_ADDOPTS="${PYTEST_ADDOPTS:-} %{__pytest_addopts}"}\\\ + %__pytest} # Fix for bug 1579367 # Due to https://pagure.io/koji/issue/912, python[23]-koji package does not -- cgit v1.2.3