summaryrefslogtreecommitdiff
path: root/rpkg.spec
diff options
context:
space:
mode:
Diffstat (limited to 'rpkg.spec')
-rw-r--r--rpkg.spec9
1 files changed, 9 insertions, 0 deletions
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