Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/pybind11.git#9ba40cff8a3bd9a6186faff1a40e5b21a7ae6634
This commit is contained in:
DistroBaker 2020-12-06 11:38:16 +00:00
parent b9c0246904
commit c3a75fe93d
5 changed files with 43 additions and 24 deletions

2
.gitignore vendored
View File

@ -9,3 +9,5 @@
/pybind11-2.4.2.tar.gz /pybind11-2.4.2.tar.gz
/pybind11-2.4.3.tar.gz /pybind11-2.4.3.tar.gz
/pybind11-2.5.0.tar.gz /pybind11-2.5.0.tar.gz
/pybind11-2.6.0.tar.gz
/pybind11-2.6.1.tar.gz

View File

@ -1,16 +0,0 @@
diff -up pybind11-2.5.0/pybind11/__init__.py.hpath pybind11-2.5.0/pybind11/__init__.py
--- pybind11-2.5.0/pybind11/__init__.py.hpath 2020-04-01 08:30:49.562640795 +0200
+++ pybind11-2.5.0/pybind11/__init__.py 2020-04-01 08:31:53.176754407 +0200
@@ -2,11 +2,4 @@ from ._version import version_info, __ve
def get_include(user=False):
- import os
- d = os.path.dirname(__file__)
- if os.path.exists(os.path.join(d, "include")):
- # Package is installed
- return os.path.join(d, "include")
- else:
- # Package is from a source directory
- return os.path.join(os.path.dirname(d), "include")
+ return '/usr/include/pybind11'

View File

@ -0,0 +1,30 @@
diff -up pybind11-2.6.1/pybind11/commands.py.hpath pybind11-2.6.1/pybind11/commands.py
--- pybind11-2.6.1/pybind11/commands.py.hpath 2020-11-11 22:33:21.000000000 +0100
+++ pybind11-2.6.1/pybind11/commands.py 2020-11-12 13:22:07.355000414 +0100
@@ -1,22 +1,8 @@
# -*- coding: utf-8 -*-
import os
-
-DIR = os.path.abspath(os.path.dirname(__file__))
-
-
def get_include(user=False):
- # type: (bool) -> str
- installed_path = os.path.join(DIR, "include")
- source_path = os.path.join(os.path.dirname(DIR), "include")
- return installed_path if os.path.exists(installed_path) else source_path
-
+ return '/usr/include/pybind11'
def get_cmake_dir():
- # type: () -> str
- cmake_installed_path = os.path.join(DIR, "share", "cmake", "pybind11")
- if os.path.exists(cmake_installed_path):
- return cmake_installed_path
- else:
- msg = "pybind11 not installed, installation required to access the CMake files"
- raise ImportError(msg)
+ return '/usr/share/cmake/pybind11'
diff -up pybind11-2.6.1/pybind11/__init__.py.hpath pybind11-2.6.1/pybind11/__init__.py
diff -up pybind11-2.6.1/pybind11/__main__.py.hpath pybind11-2.6.1/pybind11/__main__.py

View File

@ -15,17 +15,16 @@
%global python3_enabled 1 %global python3_enabled 1
Name: pybind11 Name: pybind11
Version: 2.5.0 Version: 2.6.1
Release: 5%{?dist} Release: 1%{?dist}
Summary: Seamless operability between C++11 and Python Summary: Seamless operability between C++11 and Python
License: BSD License: BSD
URL: https://github.com/pybind/pybind11 URL: https://github.com/pybind/pybind11
Source0: https://github.com/pybind/pybind11/archive/v%{version}/%{name}-%{version}.tar.gz Source0: https://github.com/pybind/pybind11/archive/v%{version}/%{name}-%{version}.tar.gz
# Patch out header path # Patch out header path
Patch1: pybind11-2.5.0-hpath.patch Patch1: pybind11-2.6.1-hpath.patch
%if %{python2_enabled} %if %{python2_enabled}
# Needed to build the python libraries # Needed to build the python libraries
@ -78,7 +77,7 @@ This package contains the development headers for pybind11.
%if %{python2_enabled} %if %{python2_enabled}
%package -n python2-%{name} %package -n python2-%{name}
Summary: %{summary} Summary: %{summary}
%{?python_provide:%python_provide python2-%{srcname}} %{?python_provide:%python_provide python2-pybind11}
Requires: %{name}-devel%{?_isa} = %{version}-%{release} Requires: %{name}-devel%{?_isa} = %{version}-%{release}
%description -n python2-%{name} %description -n python2-%{name}
@ -90,7 +89,7 @@ This package contains the Python 2 files.
%if %{python3_enabled} %if %{python3_enabled}
%package -n python3-%{name} %package -n python3-%{name}
Summary: %{summary} Summary: %{summary}
%{?python_provide:%python_provide python3-%{srcname}} %{?python_provide:%python_provide python3-pybind11}
Requires: %{name}-devel%{?_isa} = %{version}-%{release} Requires: %{name}-devel%{?_isa} = %{version}-%{release}
@ -158,9 +157,10 @@ PYBIND11_USE_CMAKE=true %py3_install "--install-purelib" "%{python3_sitearch}"
%files devel %files devel
%license LICENSE %license LICENSE
%doc README.md %doc README.rst
%{_includedir}/pybind11/ %{_includedir}/pybind11/
%{_datadir}/cmake/pybind11/ %{_datadir}/cmake/pybind11/
%{_bindir}/pybind11-config
%if %{python2_enabled} %if %{python2_enabled}
%files -n python2-%{name} %files -n python2-%{name}
@ -175,6 +175,9 @@ PYBIND11_USE_CMAKE=true %py3_install "--install-purelib" "%{python3_sitearch}"
%endif %endif
%changelog %changelog
* Thu Nov 12 2020 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.6.1-1
- Update to 2.6.1.
* Wed Aug 12 2020 Merlin Mathesius <mmathesi@redhat.com> - 2.5.0-5 * Wed Aug 12 2020 Merlin Mathesius <mmathesi@redhat.com> - 2.5.0-5
- Drop Python 2 support for ELN and RHEL9+ - Drop Python 2 support for ELN and RHEL9+

View File

@ -1 +1 @@
SHA512 (pybind11-2.5.0.tar.gz) = 7f3a9c71916749436898d1844ef6b112baf0817a386308b5df8dec2a912ef4b6a932b94965e98f227c49fa77312f131972a6039f23b84a3daf6442a8ab0be7c2 SHA512 (pybind11-2.6.1.tar.gz) = 8730efec82eef8dc09a58ca3e3b28fca45880cef85d32aa5524a8fe64e23d5f6dff4ca1b48b3034a287199bd56f4db4d6806c5358bef66fde84ed0fbf80ec264