Skip to content

Commit 00e263f

Browse files
committed
Adjust buildrequires
- Remove cmake and ninja from buildrequires - Add the tests/requirements.txt
1 parent 9956f6c commit 00e263f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.distro/pybind11.spec

+10
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ BuildRequires: cmake
1313
BuildRequires: ninja-build
1414
BuildRequires: gcc
1515
BuildRequires: gcc-c++
16+
# Test dependencies from tests/requirements.txt
17+
# Cannot include the file because requirements are too constrained
18+
BuildRequires: python3dist(build)
19+
BuildRequires: python3dist(numpy)
20+
BuildRequires: python3dist(pytest)
21+
BuildRequires: python3dist(pytest-timeout)
22+
BuildRequires: python3dist(scipy)
1623

1724
%global _description %{expand:
1825
pybind11 is a lightweight header-only library that exposes C++ types
@@ -38,6 +45,9 @@ BuildRequires: pybind11-devel
3845

3946
%prep
4047
%autosetup -n pybind11-%{version}
48+
# Remove cmake and ninja from buildrequires
49+
sed -i -E 's/,?\s*"cmake[^"]*"//' pyproject.toml
50+
sed -i -E 's/,?\s*"ninja[^"]*"//' pyproject.toml
4151

4252

4353
%generate_buildrequires

0 commit comments

Comments
 (0)