diff options
author | CoprDistGit <infra@openeuler.org> | 2023-03-23 09:01:21 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-03-23 09:01:21 +0000 |
commit | 509345f3beefe6a315adcaf3bf331beee24a5426 (patch) | |
tree | bba228b163128a0cdac0b1ec59585753072e46c4 | |
parent | 553e48f2190336e545a329fd18b0e86ee6afb8f1 (diff) |
automatic import of modulemd-toolsopeneuler20.03
-rw-r--r-- | modulemd-tools.spec | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/modulemd-tools.spec b/modulemd-tools.spec index b787cf5..c03f0aa 100644 --- a/modulemd-tools.spec +++ b/modulemd-tools.spec @@ -7,6 +7,15 @@ BuildArch: noarch %global release_name %{name}-%{version}-1 %global python3 %{__python3} +# 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} URL: https://github.com/rpm-software-management/modulemd-tools Source0: %{url}/archive/%{release_name}.tar.gz @@ -149,7 +158,7 @@ cd createrepo_mod cd .. cd modulemd-add-platform -/usr/bin/pytest +%pytest cd .. cd modulemd-merge |