#75 [EPEL7] Backport %pytest from c9s
Merged 7 months ago by ngompa. Opened 8 months ago by churchyard.
rpms/ churchyard/epel-rpm-macros epel7-pytest  into  epel7

file modified
+4 -1
@@ -1,6 +1,6 @@ 

  Name:           epel-rpm-macros

  Version:        7

- Release:        37

+ Release:        38

  Summary:        Extra Packages for Enterprise Linux RPM macros

  

  Group:          System Environment/Base
@@ -101,6 +101,9 @@ 

  %{_rpmconfigdir}/sysusers.generate-pre.sh

  

  %changelog

+ * Mon Oct 30 2023 Miro Hrončok <mhroncok@redhat.com> - 7-38

+ - Backport %%pytest from c9s

+ 

  * Mon Jan 23 2023 Jitka Plesnikova <jplesnik@redhat.com> - 7-37

  - Add perl-generators-epel to the buildroot

  

file modified
+11
@@ -155,6 +155,17 @@ 

    )

  }

  

+ # This is intended for Python 3.6 only, hence no Python version in the name

+ %__pytest /usr/bin/pytest-3

+ %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}

+ 

+ 

  # Backport from 4.15

  %_smp_build_ncpus %([ -z "$RPM_BUILD_NCPUS" ] \\\

    && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\

As requested by @rebus.

I have tested this with a simple specfile and seems to work.

Pull-Request has been merged by ngompa

7 months ago