%bcond_with dotests %global __tar /opt/freeware/bin/tar %global py_major 3.9 %global py_minor 16 %global python_major python%{py_major} %global pkgname pybind11 %global meta_package python3-%{pkgname} %global python3_sitearch %(%{python_major} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(0))") %global python3_sitearch64 %(%{python_major} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") Name: %{python_major}-%{pkgname} Version: 2.10.1 Release: 1 Summary: Seamless operability between C++11 and Python License: BSD URL: https://github.com/pybind/pybind11 Source0: https://github.com/pybind/pybind11/archive/v%{version}/%{pkgname}-%{version}.tar.gz Group: Development/Libraries Prefix: %{_prefix} BuildRequires: %{python_major}-devel >= %{py_major}.%{py_minor} BuildRequires: %{python_major}-setuptools >= 65.2.0 BuildRequires: gcc-c++ BuildRequires: cmake Requires: %{python_major} >= %{py_major}.%{py_minor} %description pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code. %package -n %{meta_package} Summary: Meta-package for %{name} Requires: python3 >= %{py_major}.%{py_minor} Requires: %{name} = %{version}-%{release} %description -n %{meta_package} This is a Meta-package for %{name} package. %prep %autosetup -n %{pkgname}-%{version} -p1 %build export PATH=/opt/freeware/bin:$PATH %{python_major} setup.py build %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %{python_major} setup.py install --root ${RPM_BUILD_ROOT} cd ${RPM_BUILD_ROOT}%{_bindir} mv pybind11-config pybind11-config3.9 ln -s pybind11-config3.9 pybind11-config %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %license LICENSE %doc README.rst %{_bindir}/pybind11-config3.9 %{python3_sitearch}/pybind11 %{python3_sitearch}/pybind11*.egg-info %files -n %{meta_package} %defattr(-,root,system,-) %{_bindir}/pybind11-config %changelog * Fri Jun 30 2023 Ranjit Ranjan - 2.10.1-1 - Update to 2.10.1 . * Wed Feb 15 2023 Ranjit Ranjan - 2.7.1-2 - pybind11 build for python3.9 * Thu Sep 16 2021 Ayappan P - 2.7.1-1 - First port of pybind11 to AIX Toolbox