This is an automated email from the ASF dual-hosted git repository.
dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 02779aab97 [INLONG-12054][SDK] Optimize InLong Dataproxy Python SDK
dependency version requirements (#12055)
02779aab97 is described below
commit 02779aab97e6ed0446bbd5dd975a0d522362c4a3
Author: yfsn666 <[email protected]>
AuthorDate: Mon Dec 22 15:49:35 2025 +0800
[INLONG-12054][SDK] Optimize InLong Dataproxy Python SDK dependency version
requirements (#12055)
---
.../dataproxy-sdk-python/CMakeLists.txt | 2 ++
.../dataproxy-sdk-python/README.md | 22 ++++++++++++++++------
.../dataproxy-sdk-python/build.sh | 2 +-
.../dataproxy-sdk-python/requirements.txt | 2 +-
4 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-python/CMakeLists.txt
b/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-python/CMakeLists.txt
index 5f84a35b19..b7060bd210 100644
--- a/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-python/CMakeLists.txt
+++ b/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-python/CMakeLists.txt
@@ -21,6 +21,8 @@ cmake_minimum_required(VERSION 3.5)
project(dataproxy-sdk-python)
set(CMAKE_CXX_STANDARD 11)
+set(PYBIND11_LTO OFF)
+set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/dataproxy-sdk-cpp/src/core")
diff --git a/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-python/README.md
b/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-python/README.md
index 7a11d83700..9d5285077e 100644
--- a/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-python/README.md
+++ b/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-python/README.md
@@ -25,12 +25,16 @@ Dataproxy-SDK Python version, used for sending data to
InLong dataproxy.
InLong Dataproxy Python SDK is a wrapper over the existing [C++
SDK](https://github.com/apache/inlong/tree/master/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-cpp)
and exposes all of the same features.
## Prerequisites
-- CMake 3.5+
-- Python 3.6+
+- CMake 3.12+
+- Python 3.7+
## Build
-### Build the C++ SDK
+There are two ways to build dataproxy-sdk-python:
+
+### Method 1: Native Build
+
+#### Step 1: Build the C++ SDK
Go to the `dataproxy-sdk-cpp` root directory, and run the following commands:
@@ -42,7 +46,7 @@ chmod +x ./build_third_party.sh && chmod +x ./build.sh
If you have already built the C++ SDK, you can skip this step.
-### Build the Python SDK
+#### Step 2: Build the Python SDK
Go to the `dataproxy-sdk-python` root directory, and run the following
commands:
@@ -68,13 +72,19 @@ chmod +x ./build.sh
```
The script will copy .so files to the specified directory. Make sure the
target directory exists before running the command.
+### Method 2: Docker Build
+
+Use a pre-configured Docker environment with all necessary dependencies.
+
+For detailed instructions on Docker-based builds, see
[dataproxy-sdk-docker/README.md](../dataproxy-sdk-docker/README.md).
+
After the build process finished, you can import the package (`import
inlong_dataproxy`) in your python project to use InLong dataproxy.
**Important Notes:**
-- If you specify a target directory, make sure it exists before running the
build script. The script will exit with an error if the specified directory
doesn't exist.
+- If you specify a target directory in native build, make sure it exists
before running the build script. The script will exit with an error if the
specified directory doesn't exist.
- If no target directory is specified and no system site-packages directories
are found, the .so files will remain in the `build` directory and you'll need
to copy them manually to your project.
-> **Note**: When the C++ SDK or the version of Python you're using is updated,
you'll need to rebuild it by the above steps.
+> **Note**: When the C++ SDK or the version of Python you're using is updated,
you'll need to rebuild it using either of the above methods (Native Build or
Docker Build).
## Config Parameters
diff --git a/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-python/build.sh
b/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-python/build.sh
index 664fe637a5..0063cf5d82 100755
--- a/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-python/build.sh
+++ b/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-python/build.sh
@@ -80,7 +80,7 @@ if [ ! -d "$PY_SDK_DIR/pybind11/build" ]; then
if [ -d "$PY_SDK_DIR/pybind11" ]; then
rm -r "$PY_SDK_DIR/pybind11"
fi
- PYBIND11_VERSION="v2.13.0"
+ PYBIND11_VERSION="v2.10.4"
git clone --branch $PYBIND11_VERSION --depth 1
https://github.com/pybind/pybind11.git "$PY_SDK_DIR/pybind11"
mkdir "$PY_SDK_DIR/pybind11/build" && cd "$PY_SDK_DIR/pybind11/build"
diff --git
a/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-python/requirements.txt
b/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-python/requirements.txt
index e160152b52..4ceaa0e488 100644
--- a/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-python/requirements.txt
+++ b/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-python/requirements.txt
@@ -1 +1 @@
-pytest>=7.1.2
\ No newline at end of file
+pytest>=7.0.0
\ No newline at end of file