forked from pool/xtensor-python
Accepting request 1233926 from devel:libraries:c_c++
OBS-URL: https://build.opensuse.org/request/show/1233926 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xtensor-python?expand=0&rev=3
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Dec 19 13:50:59 UTC 2024 - Matwey Kornilov <matwey.kornilov@gmail.com>
|
||||||
|
|
||||||
|
- Run unit tests for all available python versions
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon May 27 17:29:38 UTC 2024 - Andreas Schwab <schwab@suse.de>
|
Mon May 27 17:29:38 UTC 2024 - Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
|||||||
@@ -25,15 +25,17 @@ URL: https://github.com/xtensor-stack/xtensor-python
|
|||||||
Source0: https://github.com/xtensor-stack/xtensor-python/archive/refs/tags/%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/xtensor-stack/xtensor-python/archive/refs/tags/%{version}/%{name}-%{version}.tar.gz
|
||||||
Patch0: 0001-Install-as-arch-independent.patch
|
Patch0: 0001-Install-as-arch-independent.patch
|
||||||
Patch1: cxx-flags.patch
|
Patch1: cxx-flags.patch
|
||||||
|
BuildRequires: %{python_module breathe}
|
||||||
|
BuildRequires: %{python_module numpy-devel}
|
||||||
|
BuildRequires: %{pythons}
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: doctest-devel
|
BuildRequires: doctest-devel
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: gtest
|
BuildRequires: gtest
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: python3
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: python3-breathe
|
|
||||||
BuildRequires: python3-numpy-devel
|
|
||||||
BuildRequires: xtensor-devel >= 0.25.0
|
BuildRequires: xtensor-devel >= 0.25.0
|
||||||
BuildRequires: cmake(pybind11) >= 2.6.1
|
BuildRequires: cmake(pybind11) >= 2.6.1
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
@@ -79,22 +81,38 @@ enables seamless interoperability between C++ and Python.
|
|||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake -DBUILD_TESTS:BOOL=ON
|
%define __builddir build
|
||||||
|
|
||||||
|
%cmake
|
||||||
%cmake_build
|
%cmake_build
|
||||||
|
|
||||||
#build documentation
|
# build documentation
|
||||||
cd %{_builddir}/%{name}-%{version}/docs
|
make -C %{_builddir}/%{buildsubdir}/docs html
|
||||||
make html
|
|
||||||
|
# build unit tests for each available python version
|
||||||
|
%{python_expand #
|
||||||
|
cd %{_builddir}/%{buildsubdir}
|
||||||
|
%define __builddir build.$python
|
||||||
|
%cmake -DBUILD_TESTS:BOOL=ON -DPYTHON_EXECUTABLE=%{_bindir}/$python
|
||||||
|
%cmake_build
|
||||||
|
}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%define __builddir build
|
||||||
|
|
||||||
%cmake_install
|
%cmake_install
|
||||||
|
|
||||||
#install documentation
|
# install documentation
|
||||||
mkdir -p %{buildroot}/%{_docdir}/%{name}
|
mkdir -p %{buildroot}/%{_docdir}/%{name}
|
||||||
cp -r %{_builddir}/%{name}-%{version}/docs/build/html/* %{buildroot}/%{_docdir}/%{name}
|
cp -r %{_builddir}/%{buildsubdir}/docs/build/html/* %{buildroot}/%{_docdir}/%{name}
|
||||||
|
|
||||||
|
%fdupes -s %{buildroot}/%{_docdir}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%cmake_build -C %{__builddir} xtest
|
# run unit tests
|
||||||
|
%{python_expand #
|
||||||
|
%cmake_build -C %{_builddir}/%{buildsubdir}/build.$python xtest
|
||||||
|
}
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%doc %{_docdir}/%{name}
|
%doc %{_docdir}/%{name}
|
||||||
|
|||||||
Reference in New Issue
Block a user