From e45dd78bbdca031a5434b1b701ad572b947701d2 Mon Sep 17 00:00:00 2001 From: realpython-bot Date: Mon, 16 Nov 2026 06:08:27 +0000 Subject: [PATCH] Sync python-bindings with the maintenance update of Python Bindings: Calling C or C++ From Python Co-Authored-By: Claude Opus 5.5 --- python-bindings/requirements.txt | 11 ++++++----- python-bindings/tasks.py | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/python-bindings/requirements.txt b/python-bindings/requirements.txt index b370baff4c..65a58f7fe5 100644 --- a/python-bindings/requirements.txt +++ b/python-bindings/requirements.txt @@ -1,5 +1,6 @@ -cffi==1.13.2 -Cython==0.29.14 -invoke==1.3.0 -pybind11==2.4.3 -pycparser==2.19 +cffi==2.1.1 +Cython==3.3.1 +invoke==3.0.3 +pybind11==3.1.0 +pycparser==3.12 +setuptools==84.2.1 diff --git a/python-bindings/tasks.py b/python-bindings/tasks.py index 10ec7a4623..d4559d15f8 100644 --- a/python-bindings/tasks.py +++ b/python-bindings/tasks.py @@ -141,7 +141,7 @@ def compile_python_module(cpp_name, extension_name): invoke.run( "g++ -O3 -Wall -Werror -shared -std=c++11 -fPIC " "`python3 -m pybind11 --includes` " - "-I . " + "`python3-config --includes` -I . " "{0} " "-o {1}`python3-config --extension-suffix` " "-L. -lcppmult -Wl,-rpath,.".format(cpp_name, extension_name)