Compare commits
10 Commits
923f2dad97
...
450cc2826c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
450cc2826c | ||
|
|
7c7c7018d4 | ||
|
|
c8e29afe1c | ||
|
|
843f87b115 | ||
|
|
a34878113e | ||
|
|
ae2fdb160c | ||
|
|
d1ab31ae6f | ||
|
|
6662f6d278 | ||
|
|
b16c16dcf6 | ||
|
|
bf6e43b5dc |
@ -0,0 +1,52 @@
|
||||
From aec6cc5406edb076f5a489c2d7f84bb07052c4a3 Mon Sep 17 00:00:00 2001
|
||||
From: Ilya Lavrenov <ilya.lavrenov@intel.com>
|
||||
Date: Mon, 8 Jan 2024 17:40:41 +0400
|
||||
Subject: [PATCH] fix(cmake): skip empty PYBIND11_PYTHON_EXECUTABLE_LAST
|
||||
for the first cmake run (#4856)
|
||||
|
||||
* fix(cmake): skip empty PYBIND11_PYTHON_EXECUTABLE_LAST for the first cmake run
|
||||
|
||||
* style: pre-commit fixes
|
||||
|
||||
* Update pybind11NewTools.cmake
|
||||
|
||||
* style: pre-commit fixes
|
||||
|
||||
Reference: https://github.com/pybind/pybind11/commit/aec6cc5406edb076f5a489c2d7f84bb07052c4a3
|
||||
---------
|
||||
|
||||
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
||||
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
|
||||
---
|
||||
tools/pybind11NewTools.cmake | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tools/pybind11NewTools.cmake b/tools/pybind11NewTools.cmake
|
||||
index cd88a645..9fe2eb08 100644
|
||||
--- a/tools/pybind11NewTools.cmake
|
||||
+++ b/tools/pybind11NewTools.cmake
|
||||
@@ -110,15 +110,17 @@ if(NOT DEFINED ${_Python}_EXECUTABLE)
|
||||
|
||||
endif()
|
||||
|
||||
-if(NOT ${_Python}_EXECUTABLE STREQUAL PYBIND11_PYTHON_EXECUTABLE_LAST)
|
||||
+if(DEFINED PYBIND11_PYTHON_EXECUTABLE_LAST AND NOT ${_Python}_EXECUTABLE STREQUAL
|
||||
+ PYBIND11_PYTHON_EXECUTABLE_LAST)
|
||||
# Detect changes to the Python version/binary in subsequent CMake runs, and refresh config if needed
|
||||
unset(PYTHON_IS_DEBUG CACHE)
|
||||
unset(PYTHON_MODULE_EXTENSION CACHE)
|
||||
- set(PYBIND11_PYTHON_EXECUTABLE_LAST
|
||||
- "${${_Python}_EXECUTABLE}"
|
||||
- CACHE INTERNAL "Python executable during the last CMake run")
|
||||
endif()
|
||||
|
||||
+set(PYBIND11_PYTHON_EXECUTABLE_LAST
|
||||
+ "${${_Python}_EXECUTABLE}"
|
||||
+ CACHE INTERNAL "Python executable during the last CMake run")
|
||||
+
|
||||
if(NOT DEFINED PYTHON_IS_DEBUG)
|
||||
# Debug check - see https://stackoverflow.com/questions/646518/python-how-to-detect-debug-Interpreter
|
||||
execute_process(
|
||||
--
|
||||
2.18.2
|
||||
|
||||
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
||||
# pybind11
|
||||
|
||||
#### Description
|
||||
Pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa.
|
||||
|
||||
#### Software Architecture
|
||||
Software architecture description
|
||||
|
||||
#### Installation
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Contribution
|
||||
|
||||
1. Fork the repository
|
||||
2. Create Feat_xxx branch
|
||||
3. Commit your code
|
||||
4. Create Pull Request
|
||||
|
||||
|
||||
#### Gitee Feature
|
||||
|
||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
37
README.md
37
README.md
@ -1,37 +0,0 @@
|
||||
# pybind11
|
||||
|
||||
#### 介绍
|
||||
Pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa.
|
||||
|
||||
#### 软件架构
|
||||
软件架构说明
|
||||
|
||||
|
||||
#### 安装教程
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 使用说明
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 参与贡献
|
||||
|
||||
1. Fork 本仓库
|
||||
2. 新建 Feat_xxx 分支
|
||||
3. 提交代码
|
||||
4. 新建 Pull Request
|
||||
|
||||
|
||||
#### 特技
|
||||
|
||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
|
||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
|
||||
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
|
||||
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
||||
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
BIN
pybind11-2.11.1.tar.gz
Normal file
BIN
pybind11-2.11.1.tar.gz
Normal file
Binary file not shown.
93
pybind11.spec
Normal file
93
pybind11.spec
Normal file
@ -0,0 +1,93 @@
|
||||
%global debug_package %{nil}
|
||||
%bcond_without tests
|
||||
Name: pybind11
|
||||
Version: 2.11.1
|
||||
Release: 2
|
||||
Summary: Seamless operability between C++11 and Python
|
||||
License: BSD
|
||||
URL: https://github.com/pybind/pybind11
|
||||
Source0: https://github.com/pybind/pybind11/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
|
||||
Patch0001: 0001-fix-cmake-skip-empty-PYBIND11_PYTHON_EXECUTABLE_LAST.patch
|
||||
|
||||
BuildRequires: make cmake eigen3-devel gcc-c++
|
||||
BuildRequires: python3-devel python3-setuptools
|
||||
#BuildRequires: python3-numpy python3-pytest
|
||||
|
||||
|
||||
%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 devel
|
||||
Summary: Development headers for pybind11
|
||||
Provides: %{name}-static = %{version}-%{release}
|
||||
Requires: cmake
|
||||
|
||||
%description devel
|
||||
This package contains the development headers for pybind11.
|
||||
|
||||
%package -n python3-%{name}
|
||||
Summary: %{summary}
|
||||
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description -n python3-%{name}
|
||||
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.
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
|
||||
|
||||
%build
|
||||
pys=""
|
||||
pys="$pys python3"
|
||||
for py in $pys; do
|
||||
mkdir $py
|
||||
%cmake -B $py -DCMAKE_BUILD_TYPE=Debug -DPYTHON_EXECUTABLE=%{_bindir}/$py -DPYBIND11_INSTALL=TRUE -DUSE_PYTHON_INCLUDE_DIR=FALSE %{!?with_tests:-DPYBIND11_TEST=OFF}
|
||||
%make_build -C $py
|
||||
done
|
||||
|
||||
%py3_build
|
||||
|
||||
|
||||
%check
|
||||
#make -C python3 check %{?_smp_mflags}
|
||||
|
||||
|
||||
%install
|
||||
%make_install -C python3
|
||||
PYBIND11_USE_CMAKE=true %py3_install "--install-purelib" "%{python3_sitearch}"
|
||||
|
||||
|
||||
%files devel
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%{_includedir}/pybind11/
|
||||
%{_datadir}/cmake/pybind11/
|
||||
%{_bindir}/pybind11-config
|
||||
%{_datadir}/pkgconfig/%{name}.pc
|
||||
|
||||
%files -n python3-%{name}
|
||||
%{python3_sitearch}/%{name}/
|
||||
%{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu May 09 2024 lixiaoyong <lixiaoyong@kylinos.cn> - 2.11.1-2
|
||||
- fix(cmake): skip empty PYBIND11_PYTHON_EXECUTABLE_LAST for the first cmake run
|
||||
|
||||
* Mon Jul 31 2023 zhangchenglin <zhangchenglin@kylinos.cn> - 2.11.1-1
|
||||
- Update package to version 2.11.1
|
||||
|
||||
* Fri Apr 7 2023 liyanan <thistleslyn@163.com> - 2.10.4-1
|
||||
- Upgrade package to version 2.10.4
|
||||
|
||||
* Thu Aug 4 2022 wenzhiwei <wenzhiwei@kylinos.cn> - 2.10.0-1
|
||||
- Update to 2.10.0
|
||||
|
||||
* Sat Dec 11 2021 zhouwenpei <zhouwenpei1@huawei.com> - 2.8.1-1
|
||||
- package init
|
||||
4
pybind11.yaml
Normal file
4
pybind11.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
version_control: github
|
||||
src_repo: pybind/pybind11
|
||||
tag_prefix: ^v
|
||||
seperator: .
|
||||
Loading…
x
Reference in New Issue
Block a user