You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tsfile.apache.org by ho...@apache.org on 2026/06/08 07:46:17 UTC
(tsfile) branch rc/2.3.1 updated: Fix Windows wheel runtime packaging
This is an automated email from the ASF dual-hosted git repository.
hongzhi-gao pushed a commit to branch rc/2.3.1
in repository https://gitbox.apache.org/repos/asf/tsfile.git
The following commit(s) were added to refs/heads/rc/2.3.1 by this push:
new f632ba2b5 Fix Windows wheel runtime packaging
f632ba2b5 is described below
commit f632ba2b5d250af77ddf021192fce55196a1f817
Author: 761417898 <76...@qq.com>
AuthorDate: Mon Jun 8 15:44:50 2026 +0800
Fix Windows wheel runtime packaging
---
.github/workflows/wheels.yml | 9 ++++++++-
cpp/CMakeLists.txt | 2 +-
python/pyproject.toml | 2 +-
python/setup.py | 17 ++++++++++++++---
4 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml
index 148266ce9..8f02f8d11 100644
--- a/.github/workflows/wheels.yml
+++ b/.github/workflows/wheels.yml
@@ -206,6 +206,14 @@ jobs:
-Dspotless.check.skip=true -Dspotless.apply.skip=true
test -d cpp/target/build/lib
test -d cpp/target/build/include
+ dll="$(find cpp/target/build/lib -maxdepth 1 -type f \( -name 'libtsfile.dll' -o -name 'tsfile.dll' \) | head -n 1)"
+ test -n "$dll"
+ ldd "$dll" \
+ | awk '/mingw64/ { print $3 }' \
+ | while read -r dep; do
+ test -f "$dep" || continue
+ cp -v "$dep" cpp/target/build/lib/
+ done
- name: Upload C++ build output
uses: actions/upload-artifact@v7
@@ -288,4 +296,3 @@ jobs:
with:
name: tsfile-wheels-windows-py${{ matrix.python-version }}
path: python/dist/*.whl
-
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index ba2c0c921..30471f780 100755
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -29,7 +29,7 @@ endif ()
if (POLICY CMP0079)
cmake_policy(SET CMP0079 NEW)
endif ()
-set(TsFile_CPP_VERSION 2.2.1.dev)
+set(TsFile_CPP_VERSION 2.3.1)
if (MSVC)
# MSVC does not provide a /std:c++11 flag; C++11 is its implicit baseline.
diff --git a/python/pyproject.toml b/python/pyproject.toml
index 3a2789853..920f0a6ef 100644
--- a/python/pyproject.toml
+++ b/python/pyproject.toml
@@ -28,7 +28,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "tsfile"
-version = "2.2.1.dev"
+version = "2.3.1"
requires-python = ">=3.9"
description = "TsFile Python"
readme = {file = "README.md", content-type = "text/markdown"}
diff --git a/python/setup.py b/python/setup.py
index 19ada7921..c80cf285a 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -30,7 +30,7 @@ from setuptools.command.build_ext import build_ext
ROOT = Path(__file__).parent.resolve()
PKG = ROOT / "tsfile"
-version = "2.2.1.dev"
+version = "2.3.1"
def _find_cpp_build():
@@ -149,13 +149,24 @@ elif sys.platform == "win32":
if win_toolchain == "mingw":
# Copy MinGW runtime DLLs next to tsfile.dll so Python can find them.
- # Python 3.8+ does not search PATH for DLLs; they must sit in the
- # same directory as the .pyd extensions (os.add_dll_directory).
+ # Prefer DLLs shipped with the C++ build artifact: the Windows wheel
+ # workflow builds C++ and Python in separate jobs, and copying runtimes
+ # from the wheel job can pair libtsfile.dll with a different MinGW
+ # runtime version.
+ for _src in sorted(CPP_LIB.glob("*.dll")):
+ if _src.name != dll_src.name:
+ shutil.copy2(_src, PKG / _src.name)
+ print(f"setup.py: copied {_src.name} from C++ build output")
+
+ # Local direct builds may not have staged runtime DLLs in CPP_LIB. Keep
+ # the existing PATH-based fallback for the standard MinGW runtime set.
for _mingw_dll in (
"libstdc++-6.dll",
"libgcc_s_seh-1.dll",
"libwinpthread-1.dll",
):
+ if (PKG / _mingw_dll).is_file():
+ continue
for _dir in os.environ.get("PATH", "").split(os.pathsep):
_src = Path(_dir) / _mingw_dll
if _src.is_file():