#37 Use dynamic BuildRequires for python runtime dependencies
Merged 3 months ago by nforro. Opened 3 months ago by gotmax23.
rpms/ gotmax23/scipy runtime-deps  into  rawhide

file modified
+26 -21
@@ -30,7 +30,7 @@ 

  Summary:    Scientific Tools for Python

  Name:       scipy

  Version:    1.11.3

- Release:    6%{?dist}

+ Release:    7%{?dist}

  

  # BSD-3-Clause -- whole package except:

  # BSD-2-Clause -- scipy/_lib/_pep440.py
@@ -71,13 +71,6 @@ 

  BuildRequires:  pybind11-devel

  BuildRequires:  python3-devel, python3-numpy-f2py

  

- BuildRequires:  python3-pytest

- BuildRequires:  python3-pytest-timeout

- %if ! 0%{?rhel}

- BuildRequires:  python3-pytest-xdist

- %endif

- BuildRequires:  python3-pooch

- 

  %if %{with doc}

  BuildRequires:  python3-sphinx

  BuildRequires:  python3-matplotlib
@@ -162,8 +155,8 @@ 

    rm $f.orig

  done

  

- # Do not do benchmarking or coverage testing for RPM builds

- sed -i '/^[[:blank:]]*"(asv|pytest-cov)"/d' pyproject.toml

+ # Do not do benchmarking, coverage, or timeout testing for RPM builds

+ sed -Ei '/^[[:blank:]]*"(asv|pytest-cov|pytest-timeout)"/d' pyproject.toml

  

  # No scikit-umfpack in Fedora

  sed -i '/^[[:blank:]]*"scikit-umfpack"/d' pyproject.toml
@@ -189,8 +182,26 @@ 

  # not a real function.  It is a weak alias to __open_memstream.

  sed -i "s/\('has_openmemstream', \)'0'/\1'1'/" scipy/_lib/meson.build

  

+ # meson-python does not implement the prepare_metadata_for_build_wheel hook :(.

+ # Instead of using -w and compiling the wheel, an expensive process, twice

+ # (once to extract metadata, one for the final package), we can write the

+ # static deps from pyproject.toml to a file, and use that with %%pyproject_buildrequires.

+ #

+ # See https://github.com/mesonbuild/meson-python/issues/236 for more discussion.

+ 

+ # This could use tomcli, but we want to avoid pulling extra dependencies into ELN/RHEL.

+ python3 -c '

+ import tomllib

+ from pathlib import Path

+ 

+ with open("pyproject.toml", "rb") as fp:

+     data = tomllib.load(fp)

+ Path("_install-requirements.txt").write_text("\n".join(data["project"]["dependencies"]))

+ Path("_test-requirements.txt").write_text("\n".join(data["project"]["optional-dependencies"]["test"]))

+ '

+ 

  %generate_buildrequires

- %pyproject_buildrequires -R

+ %pyproject_buildrequires -R _install-requirements.txt _test-requirements.txt

  

  %build

  %pyproject_wheel
@@ -220,29 +231,20 @@ 

  # check against the reference BLAS/LAPACK

  export FLEXIBLAS=netlib

  

- # default test timeout

- TIMEOUT=500

- 

  # TestDatasets try to download from the internet

  SKIP_ALL="not TestDatasets"

  export PYTEST_ADDOPTS="-k '$SKIP_ALL'"

  

- %ifarch ppc64le

- TIMEOUT=1000

- %endif

- 

  %ifarch aarch64

  # TestConstructUtils::test_concatenate_int32_overflow is flaky on aarch64

  export PYTEST_ADDOPTS="-k '$SKIP_ALL and \

  not test_concatenate_int32_overflow'"

- TIMEOUT=1000

  %endif

  

  %ifarch s390x

  # https://bugzilla.redhat.com/show_bug.cgi?id=1959353

  export PYTEST_ADDOPTS="-k '$SKIP_ALL and \

  not test_distance_transform_cdt05'"

- TIMEOUT=1000

  %endif

  

  %ifarch x86_64
@@ -261,7 +263,7 @@ 

  %endif

  

  pushd %{buildroot}/%{python3_sitearch}

- %{pytest} --timeout=${TIMEOUT} scipy %{?!rhel:--numprocesses=auto}

+ %{pytest} scipy %{?!rhel:--numprocesses=auto}

  # Remove test remnants

  rm -rf gram{A,B}

  rm -rf .pytest_cache
@@ -287,6 +289,9 @@ 

  %endif

  

  %changelog

+ * Fri Feb 02 2024 Maxwell G <maxwell@gtmx.me> - 1.11.3-7

+ - Use dynamic BuildRequires for python runtime dependencies

+ 

  * Tue Jan 30 2024 Miro Hrončok <mhroncok@redhat.com> - 1.11.3-6

  - Skip fewer tests during build

  

no initial comment

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/9c11af43af654cfbbea51365422489a8

rebased onto 8904f98

3 months ago

2 new commits added

  • Fix broken regex
  • Use dynamic BuildRequires for python runtime dependencies
3 months ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/ec09bbf21a66476dba31bfa33446a28b

the ppc build timeout out in tests. we can increase the timeout.


the ELN build failed with:

+ tomcli-get pyproject.toml -F newline-list project.dependencies
Usage: tomcli-get [OPTIONS] PATH [SELECTOR]
Try 'tomcli-get -h' for help.
Error: No such option: -F

This likely means this is pulling in an old version of tomcli (0.3.0-1.eln131), because it used to be in eln but no longer is and that usecase is kinda broken, because older tomli remained tagged to eln.

Anyway, by pulling tomcli to ELN we need to get click there as well, which I am a bit sceptical about. I wonder if we could dump the contents by some Python oneliner for now?

(Also, regarding ELN, we want to avoid xdist there.)

I pushed a change to completely remove the timeout. I don't think that is useful for RPM builds at all. https://src.fedoraproject.org/fork/gotmax23/rpms/scipy/blob/f916130c5b67ae99f58d06eae565d44282eeb020/f/scipy.spec#_167 should already remove xdist on ELN.

1 new commit added

  • Use inline python mini script instead of tomcli
3 months ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/6270ef68e1ae4b6b9f796be05b122f17

4 new commits added

  • Use inline python mini script instead of tomcli
  • Remove test timeouts
  • Fix broken regex
  • Use dynamic BuildRequires for python runtime dependencies
3 months ago

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/c0dc0304a84e43a5afcb2b8e0a071859

Pull-Request has been merged by nforro

3 months ago
Metadata