Use inline python mini script instead of tomcli
This commit is contained in:
parent
f77aeeb563
commit
7d8ddcb20c
15
scipy.spec
15
scipy.spec
@ -67,7 +67,6 @@ Patch: https://github.com/scipy/scipy/pull/19443.patch
|
|||||||
|
|
||||||
BuildRequires: %{blaslib}-devel
|
BuildRequires: %{blaslib}-devel
|
||||||
BuildRequires: gcc-gfortran, gcc-c++
|
BuildRequires: gcc-gfortran, gcc-c++
|
||||||
BuildRequires: tomcli
|
|
||||||
|
|
||||||
BuildRequires: pybind11-devel
|
BuildRequires: pybind11-devel
|
||||||
BuildRequires: python3-devel, python3-numpy-f2py
|
BuildRequires: python3-devel, python3-numpy-f2py
|
||||||
@ -189,13 +188,17 @@ sed -i "s/\('has_openmemstream', \)'0'/\1'1'/" scipy/_lib/meson.build
|
|||||||
# static deps from pyproject.toml to a file, and use that with %%pyproject_buildrequires.
|
# 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.
|
# See https://github.com/mesonbuild/meson-python/issues/236 for more discussion.
|
||||||
tomcli-get pyproject.toml -F newline-list \
|
|
||||||
project.dependencies > _install-requirements.txt
|
|
||||||
|
|
||||||
# Do the same for test dependencies
|
# This could use tomcli, but we want to avoid pulling extra dependencies into ELN/RHEL.
|
||||||
tomcli-get pyproject.toml -F newline-list \
|
python3 -c '
|
||||||
project.optional-dependencies.test > _test-requirements.txt
|
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
|
%generate_buildrequires
|
||||||
%pyproject_buildrequires -R _install-requirements.txt _test-requirements.txt
|
%pyproject_buildrequires -R _install-requirements.txt _test-requirements.txt
|
||||||
|
Loading…
Reference in New Issue
Block a user