forked from pool/python-pybind11
Accepting request 1058070 from home:bnavigator:branches:devel:languages:python
- Package new pkgconfig file gh#pybind/pybind11#4077 - PEP517 build - Fix multibuild setup: unique packagename for test flavor required OBS-URL: https://build.opensuse.org/request/show/1058070 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pybind11?expand=0&rev=40
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 12 17:50:05 UTC 2023 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Package new pkgconfig file gh#pybind/pybind11#4077
|
||||||
|
- PEP517 build
|
||||||
|
- Fix multibuild setup: unique packagename for test flavor required
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jan 4 19:48:22 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
Wed Jan 4 19:48:22 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@@ -19,8 +19,10 @@
|
|||||||
%global flavor @BUILD_FLAVOR@%{nil}
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
%if "%{flavor}" == "test"
|
%if "%{flavor}" == "test"
|
||||||
%bcond_without test
|
%bcond_without test
|
||||||
|
%define psuffix -test
|
||||||
%else
|
%else
|
||||||
%bcond_with test
|
%bcond_with test
|
||||||
|
%define psuffix %{nil}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?suse_version} > 1500
|
%if 0%{?suse_version} > 1500
|
||||||
@@ -29,10 +31,9 @@
|
|||||||
%bcond_with libalternatives
|
%bcond_with libalternatives
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python3-%{**}}
|
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
%define plainpython python
|
%define plainpython python
|
||||||
Name: python-pybind11
|
Name: python-pybind11%{psuffix}
|
||||||
Version: 2.10.3
|
Version: 2.10.3
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Module for operability between C++11 and Python
|
Summary: Module for operability between C++11 and Python
|
||||||
@@ -41,8 +42,10 @@ URL: https://github.com/pybind/pybind11
|
|||||||
Source: https://github.com/pybind/pybind11/archive/v%{version}.tar.gz#/pybind11-%{version}.tar.gz
|
Source: https://github.com/pybind/pybind11/archive/v%{version}.tar.gz#/pybind11-%{version}.tar.gz
|
||||||
Source99: python-pybind11-rpmlintrc
|
Source99: python-pybind11-rpmlintrc
|
||||||
BuildRequires: %{python_module devel >= 3.6}
|
BuildRequires: %{python_module devel >= 3.6}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: cmake
|
BuildRequires: %{python_module setuptools >= 42}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
|
BuildRequires: cmake >= 3.18
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: python-rpm-macros >= 20220912
|
BuildRequires: python-rpm-macros >= 20220912
|
||||||
@@ -90,7 +93,7 @@ This package contains files for developing applications using pybind11.
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%if !%{with test}
|
%if !%{with test}
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
# calling cmake to install header to right location and
|
# calling cmake to install header to right location and
|
||||||
# generate cmake include files
|
# generate cmake include files
|
||||||
%{python_expand pushd .
|
%{python_expand pushd .
|
||||||
@@ -114,7 +117,7 @@ popd
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%if !%{with test}
|
%if !%{with test}
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_clone -a %{buildroot}%{_bindir}/pybind11-config
|
%python_clone -a %{buildroot}%{_bindir}/pybind11-config
|
||||||
%{python_expand #
|
%{python_expand #
|
||||||
%cmake_install
|
%cmake_install
|
||||||
@@ -125,7 +128,9 @@ ln -s %{_includedir}/pybind11 %{buildroot}%{$python_sitelib}/pybind11/include/py
|
|||||||
# same for cmake files: pybind11.get_cmake_dir()
|
# same for cmake files: pybind11.get_cmake_dir()
|
||||||
rm -r %{buildroot}%{$python_sitelib}/pybind11/share/cmake/pybind11
|
rm -r %{buildroot}%{$python_sitelib}/pybind11/share/cmake/pybind11
|
||||||
ln -s %{_datadir}/cmake/pybind11 %{buildroot}%{$python_sitelib}/pybind11/share/cmake/pybind11
|
ln -s %{_datadir}/cmake/pybind11 %{buildroot}%{$python_sitelib}/pybind11/share/cmake/pybind11
|
||||||
# note: next release will also include pkg-config files here: https://github.com/pybind/pybind11/pull/4077
|
# same for pkgconfig
|
||||||
|
rm %{buildroot}%{$python_sitelib}/pybind11/share/pkgconfig/pybind11.pc
|
||||||
|
ln -s %{_datadir}/pkgconfig/pybind11.pc %{buildroot}%{$python_sitelib}/pybind11/share/pkgconfig/pybind11.pc
|
||||||
%fdupes %{buildroot}%{$python_sitelib}
|
%fdupes %{buildroot}%{$python_sitelib}
|
||||||
}
|
}
|
||||||
%endif
|
%endif
|
||||||
@@ -185,6 +190,7 @@ end
|
|||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{_includedir}/pybind11
|
%{_includedir}/pybind11
|
||||||
%{_datadir}/cmake/pybind11
|
%{_datadir}/cmake/pybind11
|
||||||
|
%{_datadir}/pkgconfig/pybind11.pc
|
||||||
|
|
||||||
%files %{python_files devel}
|
%files %{python_files devel}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
@@ -192,6 +198,7 @@ end
|
|||||||
%ghost %{python_sitelib}/pybind11/share/cmake/pybind11.rpmmoved
|
%ghost %{python_sitelib}/pybind11/share/cmake/pybind11.rpmmoved
|
||||||
%{python_sitelib}/pybind11/include
|
%{python_sitelib}/pybind11/include
|
||||||
%ghost %{python_sitelib}/pybind11/include/pybind11.rpmmoved
|
%ghost %{python_sitelib}/pybind11/include/pybind11.rpmmoved
|
||||||
|
%{python_sitelib}/pybind11/share/pkgconfig
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user