%global _empty_manifest_terminate_build 0
Name:		python-opencv-python-headless
Version:	4.11.0.86
Release:	2
Summary:	Wrapper package for OpenCV python bindings.
License:	Apache 2.0
URL:		https://github.com/opencv/opencv-python
Source0:	https://files.pythonhosted.org/packages/36/2f/5b2b3ba52c864848885ba988f24b7f105052f68da9ab0e693cc7c25b0b30/opencv-python-headless-4.11.0.86.tar.gz

Requires:	(python3-numpy)

%description
The aim of this repository is to provide means to package each new [OpenCV release](https://github.com/opencv/opencv/releases) for the most used Python versions and platforms.

%package -n python3-opencv-python-headless
Summary:	Wrapper package for OpenCV python bindings.
Provides:	python-opencv-python-headless
BuildRequires:  python3-scikit-build
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
BuildRequires:	python3-wheel
BuildRequires:	python3-cffi
BuildRequires:	gcc
BuildRequires:	gdb
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  make
BuildRequires:  python3-devel
BuildRequires:  python3-numpy
%description -n python3-opencv-python-headless
The aim of this repository is to provide means to package each new [OpenCV release](https://github.com/opencv/opencv/releases) for the most used Python versions and platforms

%prep
%autosetup -n opencv-python-headless-4.11.0.86
mkdir -p .cache/ippicv
cp ippicv_2021.12.0_lnx_intel64_20240425_general.tgz .cache/ippicv/

%build
%pyproject_build

%install
%pyproject_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
touch filelist.lst
if [ -d usr/lib64 ]; then
	find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
	find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
	find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
	find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .

%files -n python3-opencv-python-headless -f filelist.lst
%{python3_sitearch}/*

%changelog
* Mon Sep 1 2025 ylzhangah <ylzhangah@qa.com> - 4.11.0.86-2
- Update the build depends
* Sun May 11 2025 Python_Bot <Python_Bot@openeuler.org> - 4.11.0.86-1
- Package Spec generated