You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tsfile.apache.org by co...@apache.org on 2026/03/11 15:01:36 UTC

(tsfile) branch support_release_for_win created (now 5583db7aa)

This is an automated email from the ASF dual-hosted git repository.

colinlee pushed a change to branch support_release_for_win
in repository https://gitbox.apache.org/repos/asf/tsfile.git


      at 5583db7aa support release on ci.

This branch includes the following new commits:

     new bfa95c8e3 fix some err.
     new 149adc301 support python release.
     new 5583db7aa support release on ci.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(tsfile) 02/03: support python release.

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

colinlee pushed a commit to branch support_release_for_win
in repository https://gitbox.apache.org/repos/asf/tsfile.git

commit 149adc301c386a313d2fe870190d8b7409bad3c4
Author: ColinLee <sh...@163.com>
AuthorDate: Wed Mar 11 22:07:36 2026 +0800

    support python release.
---
 .github/workflows/unit-test-cpp.yml    |   6 +
 .github/workflows/unit-test-python.yml |  11 ++
 .github/workflows/wheels.yml           | 169 +++++++++++++++++++++++++
 cpp/CMakeLists.txt                     |   2 +-
 cpp/pom.xml                            |  12 +-
 java/common/pom.xml                    |   2 +-
 java/examples/pom.xml                  |   4 +-
 java/pom.xml                           |   4 +-
 java/tools/pom.xml                     |   6 +-
 java/tsfile/pom.xml                    |   4 +-
 pom.xml                                |  12 +-
 python/pom.xml                         |  40 +-----
 python/pyproject.toml                  |  69 ++++++++++
 python/requirements.txt                |   4 +-
 python/setup.py                        | 221 ++++++++++++++-------------------
 python/tsfile/__init__.py              |  12 +-
 python/tsfile/tsfile_cpp.pxd           |   6 +-
 17 files changed, 391 insertions(+), 193 deletions(-)

diff --git a/.github/workflows/unit-test-cpp.yml b/.github/workflows/unit-test-cpp.yml
index e7a3f1069..f376e65b6 100644
--- a/.github/workflows/unit-test-cpp.yml
+++ b/.github/workflows/unit-test-cpp.yml
@@ -109,6 +109,12 @@ jobs:
         shell: bash
         run: |
           if [[ "$RUNNER_OS" == "Linux" ]]; then
+            if command -v apt-get >/dev/null 2>&1; then
+              sudo apt-get update
+              sudo apt-get install -y uuid-dev
+            elif command -v yum >/dev/null 2>&1; then
+              sudo yum install -y libuuid-devel
+            fi
             sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-17 100
             sudo update-alternatives --set clang-format /usr/bin/clang-format-17
             sudo apt-get update
diff --git a/.github/workflows/unit-test-python.yml b/.github/workflows/unit-test-python.yml
index 28a6d07ca..d47bd10dd 100644
--- a/.github/workflows/unit-test-python.yml
+++ b/.github/workflows/unit-test-python.yml
@@ -60,6 +60,17 @@ jobs:
           key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
           restore-keys: ${{ runner.os }}-m2-
 
+      - name: Install dependencies
+        shell: bash
+        run: |
+          if [[ "$RUNNER_OS" == "Linux" ]]; then
+            if command -v apt-get >/dev/null 2>&1; then
+              sudo apt-get update
+              sudo apt-get install -y uuid-dev
+            elif command -v yum >/dev/null 2>&1; then
+              sudo yum install -y libuuid-devel
+            fi
+          fi
       # On Windows systems the 'mvnw' script needs an additional ".cmd" appended.
       - name: Calculate platform suffix
         id: platform_suffix
diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml
new file mode 100644
index 000000000..70a364385
--- /dev/null
+++ b/.github/workflows/wheels.yml
@@ -0,0 +1,169 @@
+name: Build TsFile wheels(multi-platform)
+
+on:
+  push:
+    branches:
+      - "release_v*.*.*"
+  pull_request:
+    paths:
+      - "cpp/**"
+      - "python/**"
+      - ".github/**"
+  workflow_dispatch:
+
+jobs:
+  build:
+    name: Build wheels on ${{ matrix.name }}
+    runs-on: ${{ matrix.os }}
+    strategy:
+      fail-fast: false
+      matrix:
+        include:
+          - name: linux-x86_64
+            os: ubuntu-22.04
+            platform: linux
+            cibw_archs_linux: "x86_64"
+
+          - name: linux-aarch64
+            os: ubuntu-22.04-arm
+            platform: linux
+            cibw_archs_linux: "aarch64"
+
+          - name: macos-x86_64
+            os: macos-15-intel
+            platform: macos
+            cibw_archs_macos: "x86_64"
+
+          - name: macos-arm64
+            os: macos-latest 
+            platform: macos
+            cibw_archs_macos: "arm64"
+#          currently, compile on windows is not supported for cibuildwheel
+#          - name: windows-amd64
+#            os: windows-2022
+#            platform: windows
+#            cibw_archs_windows: "AMD64"
+    
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v4
+        with:
+          submodules: false
+          fetch-depth: 0
+
+      - name: Set up Python
+        uses: actions/setup-python@v4
+        with:
+          python-version: "3.11"
+      
+      - name: Set up Java 17
+        uses: actions/setup-java@v4
+        with:
+          distribution: temurin
+          java-version: "17"
+
+      - name: Install system deps (macOS)
+        if: matrix.platform == 'macos'
+        run: |
+          set -eux
+          brew update
+          brew install pkg-config || true
+
+      - name: Install build tools
+        run: |
+          python -m pip install -U pip wheel
+          python -m pip install cibuildwheel==2.21.3
+
+#      - name: Build C++ core via Maven(win)
+#        if: matrix.platform == 'windows'
+#        shell: bash
+#        run: |
+#          set -euxo pipefail
+#          chmod +x mvnw || true
+#          ./mvnw -Pwith-cpp clean verify package \
+#            -DskipTests -Dspotless.check.skip=true -Dspotless.apply.skip=true
+#          test -d cpp/target/build/lib
+#          test -d cpp/target/build/include
+      
+      - name: Build C++ core via Maven (macOS)
+        if: matrix.platform == 'macos'
+        shell: bash
+        env:
+          MACOSX_DEPLOYMENT_TARGET: "12.0"
+          CFLAGS: "-mmacosx-version-min=12.0"
+          CXXFLAGS: "-mmacosx-version-min=12.0"
+          LDFLAGS: "-mmacosx-version-min=12.0"
+        run: |
+          set -euxo pipefail
+          chmod +x mvnw || true
+          ./mvnw -Pwith-cpp clean verify package \
+            -DskipTests -Dspotless.check.skip=true -Dspotless.apply.skip=true \
+            -Dcmake.args="-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0"
+          otool -l cpp/target/build/lib/libtsfile*.dylib | grep -A2 LC_VERSION_MIN_MACOSX || true
+            
+      - name: Build wheels via cibuildwheel
+        if: matrix.platform != 'macos'
+        env: 
+          CIBW_ARCHS_LINUX: ${{ matrix.cibw_archs_linux }}
+#          CIBW_ARCHS_WINDOWS: ${{ matrix.cibw_archs_windows }}
+
+          CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*"
+          CIBW_SKIP: "pp* *-musllinux*"
+
+          CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014"
+          CIBW_MANYLINUX_AARCH64_IMAGE: "manylinux2014"
+
+          MACOSX_DEPLOYMENT_TARGET: "12.0"
+
+          CIBW_BEFORE_ALL_LINUX: |
+            set -euxo pipefail
+            if command -v yum >/dev/null 2>&1; then
+              yum install -y wget tar gzip pkgconfig libuuid-devel libblkid-devel
+            else
+              echo "Not a yum-based image?" ; exit 1
+            fi
+            ARCH="$(uname -m)"
+            mkdir -p /opt/java
+            if [ "$ARCH" = "x86_64" ]; then
+              JDK_URL="https://download.oracle.com/java/17/archive/jdk-17.0.12_linux-x64_bin.tar.gz"
+            else
+              # aarch64
+              JDK_URL="https://download.oracle.com/java/17/archive/jdk-17.0.12_linux-aarch64_bin.tar.gz"
+            fi
+            curl -L -o /tmp/jdk17.tar.gz "$JDK_URL"
+            tar -xzf /tmp/jdk17.tar.gz -C /opt/java
+            export JAVA_HOME=$(echo /opt/java/jdk-17.0.12*)
+            export PATH="$JAVA_HOME/bin:$PATH"
+            java -version
+
+            chmod +x mvnw || true
+            ./mvnw -Pwith-cpp clean verify package \
+              -DskipTests -Dspotless.check.skip=true -Dspotless.apply.skip=true
+            test -d cpp/target/build/lib && test -d cpp/target/build/include
+                
+          CIBW_TEST_COMMAND: >
+            python -c "import tsfile, tsfile.tsfile_reader as r; print('import-ok:')"
+          CIBW_BUILD_VERBOSITY: "1"
+        run: cibuildwheel --output-dir wheelhouse python
+      
+      - name: Build wheels via cibuildwheel (macOS)
+        if: matrix.platform == 'macos'
+        env:
+          CIBW_ARCHS_MACOS: ${{ matrix.cibw_archs_macos }}
+          CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*"
+#          CIBW_BUILD: "cp313-*"
+          CIBW_SKIP: "pp*"
+          CIBW_ENVIRONMENT_MACOS: "MACOSX_DEPLOYMENT_TARGET=12.0"
+          MACOSX_DEPLOYMENT_TARGET: "12.0"
+          CIBW_TEST_COMMAND: >
+            python -c "import tsfile, tsfile.tsfile_reader as r; print('import-ok:')"
+          CIBW_BUILD_VERBOSITY: "1"
+        run: cibuildwheel --output-dir wheelhouse python
+
+      - name: Upload wheels as artifact
+        uses: actions/upload-artifact@v4
+        with:
+          name: tsfile-wheels-${{ matrix.name }}
+          path: wheelhouse/*.whl
+    
+          
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 45e630101..8a2c07aea 100755
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -1,4 +1,4 @@
-#[[
+#[[
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
diff --git a/cpp/pom.xml b/cpp/pom.xml
index b31b2dc12..01cc840e4 100644
--- a/cpp/pom.xml
+++ b/cpp/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.tsfile</groupId>
         <artifactId>tsfile-parent</artifactId>
-        <version>2.2.1-SNAPSHOT</version>
+        <version>2.2.0</version>
     </parent>
     <artifactId>tsfile-cpp</artifactId>
     <packaging>pom</packaging>
@@ -163,16 +163,6 @@
         </plugins>
     </build>
     <profiles>
-        <profile>
-            <id>linux-install-uuid-dev</id>
-            <activation>
-                <os>
-                    <family>unix</family>
-                    <name>Linux</name>
-                </os>
-            </activation>
-        </profile>
-        <!-- When running on jenkins, download the sonar build-wrapper, so we can do a code analysis -->
         <profile>
             <id>jenkins-build</id>
             <!-- This is needed by the groovy hack script -->
diff --git a/java/common/pom.xml b/java/common/pom.xml
index 264bdd085..7fd8e2d2c 100644
--- a/java/common/pom.xml
+++ b/java/common/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.tsfile</groupId>
         <artifactId>tsfile-java</artifactId>
-        <version>2.2.1-SNAPSHOT</version>
+        <version>2.2.0</version>
     </parent>
     <artifactId>common</artifactId>
     <name>TsFile: Java: Common</name>
diff --git a/java/examples/pom.xml b/java/examples/pom.xml
index 264b46f03..90621665d 100644
--- a/java/examples/pom.xml
+++ b/java/examples/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.tsfile</groupId>
         <artifactId>tsfile-java</artifactId>
-        <version>2.2.1-SNAPSHOT</version>
+        <version>2.2.0</version>
     </parent>
     <artifactId>examples</artifactId>
     <name>TsFile: Java: Examples</name>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>org.apache.tsfile</groupId>
             <artifactId>tsfile</artifactId>
-            <version>2.2.1-SNAPSHOT</version>
+            <version>2.2.0</version>
         </dependency>
     </dependencies>
     <build>
diff --git a/java/pom.xml b/java/pom.xml
index 7587a67e5..56ae44872 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -24,10 +24,10 @@
     <parent>
         <groupId>org.apache.tsfile</groupId>
         <artifactId>tsfile-parent</artifactId>
-        <version>2.2.1-SNAPSHOT</version>
+        <version>2.2.0</version>
     </parent>
     <artifactId>tsfile-java</artifactId>
-    <version>2.2.1-SNAPSHOT</version>
+    <version>2.2.0</version>
     <packaging>pom</packaging>
     <name>TsFile: Java</name>
     <modules>
diff --git a/java/tools/pom.xml b/java/tools/pom.xml
index 42ba58b0c..cc45b1e56 100644
--- a/java/tools/pom.xml
+++ b/java/tools/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.tsfile</groupId>
         <artifactId>tsfile-java</artifactId>
-        <version>2.2.1-SNAPSHOT</version>
+        <version>2.2.0</version>
     </parent>
     <artifactId>tools</artifactId>
     <name>TsFile: Java: Tools</name>
@@ -32,7 +32,7 @@
         <dependency>
             <groupId>org.apache.tsfile</groupId>
             <artifactId>common</artifactId>
-            <version>2.2.1-SNAPSHOT</version>
+            <version>2.2.0</version>
         </dependency>
         <dependency>
             <groupId>commons-cli</groupId>
@@ -42,7 +42,7 @@
         <dependency>
             <groupId>org.apache.tsfile</groupId>
             <artifactId>tsfile</artifactId>
-            <version>2.2.1-SNAPSHOT</version>
+            <version>2.2.0</version>
         </dependency>
         <dependency>
             <groupId>ch.qos.logback</groupId>
diff --git a/java/tsfile/pom.xml b/java/tsfile/pom.xml
index a3d919f2a..cea669e1d 100644
--- a/java/tsfile/pom.xml
+++ b/java/tsfile/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.tsfile</groupId>
         <artifactId>tsfile-java</artifactId>
-        <version>2.2.1-SNAPSHOT</version>
+        <version>2.2.0</version>
     </parent>
     <artifactId>tsfile</artifactId>
     <name>TsFile: Java: TsFile</name>
@@ -38,7 +38,7 @@
         <dependency>
             <groupId>org.apache.tsfile</groupId>
             <artifactId>common</artifactId>
-            <version>2.2.1-SNAPSHOT</version>
+            <version>2.2.0</version>
         </dependency>
         <dependency>
             <groupId>com.github.luben</groupId>
diff --git a/pom.xml b/pom.xml
index cb06548b4..fb18eaca6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
     </parent>
     <groupId>org.apache.tsfile</groupId>
     <artifactId>tsfile-parent</artifactId>
-    <version>2.2.1-SNAPSHOT</version>
+    <version>2.2.0</version>
     <packaging>pom</packaging>
     <name>Apache TsFile Project Parent POM</name>
     <properties>
@@ -135,6 +135,10 @@
                             <exclude>**/tsfile.egg-info/**</exclude>
                             <!-- Exclude third_party-->
                             <exclude>**/third_party/**</exclude>
+                            <exclude>**/.python-version</exclude>
+                            <exclude>**/**venv-py**/**</exclude>
+                            <exclude>**/.python-version</exclude>
+                            <exclude>python/.python-version</exclude>
                         </excludes>
                     </configuration>
                 </plugin>
@@ -445,6 +449,8 @@
                             <indentSize>4</indentSize>
                             <excludes>
                                 <exclude>**/target/**</exclude>
+                                <exclude>python/.python-version</exclude>
+                                <exclude>**/.python-version</exclude>
                             </excludes>
                         </configuration>
                     </execution>
@@ -751,8 +757,8 @@
                 <os.suffix>win</os.suffix>
                 <os.classifier>windows-amd64</os.classifier>
                 <cmake.generator>MinGW Makefiles</cmake.generator>
-                <python.venv.bin>venv/Scripts/</python.venv.bin>
-                <python.exe.bin>python</python.exe.bin>
+                <python.venv.bin/>
+                <python.exe.bin>python.exe</python.exe.bin>
             </properties>
         </profile>
         <!-- profile for windows aarch64 (mainly VM on newer Mac) (Self-Enabling) -->
diff --git a/python/pom.xml b/python/pom.xml
index 7a39fc7aa..59907c256 100644
--- a/python/pom.xml
+++ b/python/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.tsfile</groupId>
         <artifactId>tsfile-parent</artifactId>
-        <version>2.2.1-SNAPSHOT</version>
+        <version>2.2.0</version>
     </parent>
     <artifactId>tsfile-python</artifactId>
     <packaging>pom</packaging>
@@ -41,21 +41,6 @@
                 <artifactId>exec-maven-plugin</artifactId>
                 <executions>
                     <!-- Create python virtual environment -->
-                    <execution>
-                        <id>python-venv</id>
-                        <phase>initialize</phase>
-                        <goals>
-                            <goal>exec</goal>
-                        </goals>
-                        <configuration>
-                            <executable>${python.exe.bin}</executable>
-                            <arguments>
-                                <argument>-m</argument>
-                                <argument>venv</argument>
-                                <argument>${project.basedir}/venv</argument>
-                            </arguments>
-                        </configuration>
-                    </execution>
                     <execution>
                         <id>python-upgrade-pip</id>
                         <phase>initialize</phase>
@@ -63,7 +48,7 @@
                             <goal>exec</goal>
                         </goals>
                         <configuration>
-                            <executable>${python.venv.bin}${python.exe.bin}</executable>
+                            <executable>${python.exe.bin}</executable>
                             <arguments>
                                 <argument>-m</argument>
                                 <argument>pip</argument>
@@ -80,7 +65,7 @@
                             <goal>exec</goal>
                         </goals>
                         <configuration>
-                            <executable>${python.venv.bin}${python.exe.bin}</executable>
+                            <executable>${python.exe.bin}</executable>
                             <arguments>
                                 <argument>-m</argument>
                                 <argument>pip</argument>
@@ -97,7 +82,7 @@
                             <goal>exec</goal>
                         </goals>
                         <configuration>
-                            <executable>${python.venv.bin}${python.exe.bin}</executable>
+                            <executable>${python.exe.bin}</executable>
                             <arguments>
                                 <argument>setup.py</argument>
                                 <argument>build_ext</argument>
@@ -112,7 +97,7 @@
                             <goal>exec</goal>
                         </goals>
                         <configuration>
-                            <executable>${python.venv.bin}${python.exe.bin}</executable>
+                            <executable>${python.exe.bin}</executable>
                             <arguments>
                                 <argument>-m</argument>
                                 <argument>pip</argument>
@@ -121,19 +106,6 @@
                             </arguments>
                         </configuration>
                     </execution>
-                    <execution>
-                        <id>run-python-tests</id>
-                        <phase>test</phase>
-                        <goals>
-                            <goal>exec</goal>
-                        </goals>
-                        <configuration>
-                            <executable>${python.venv.bin}pytest</executable>
-                            <arguments>
-                                <argument>${project.basedir}/tests</argument>
-                            </arguments>
-                        </configuration>
-                    </execution>
                     <execution>
                         <id>build-whl</id>
                         <phase>package</phase>
@@ -141,7 +113,7 @@
                             <goal>exec</goal>
                         </goals>
                         <configuration>
-                            <executable>${python.venv.bin}${python.exe.bin}</executable>
+                            <executable>${python.exe.bin}</executable>
                             <arguments>
                                 <argument>setup.py</argument>
                                 <argument>bdist_wheel</argument>
diff --git a/python/pyproject.toml b/python/pyproject.toml
new file mode 100644
index 000000000..a7d275dec
--- /dev/null
+++ b/python/pyproject.toml
@@ -0,0 +1,69 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+[build-system]
+requires = [
+    "setuptools>=69",
+    "wheel", 
+    "Cython>=3", 
+    "numpy>=1.20"
+    ]
+
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "tsfile"
+version = "2.2.0"
+requires-python = ">=3.9"
+description = "TsFile Python"
+readme = {file = "README.md", content-type = "text/markdown"}
+maintainers = [
+    {name = "Apache TsFile Developers", email = "dev@tsfile.apache.org"}
+]
+dependencies = [
+    "numpy>=1.20",
+    "pandas>=2.0"
+]
+
+[project.urls]
+Homepage = "https://tsfile.apache.org/"
+Documentation = "https://tsfile.apache.org/zh/UserGuide/latest/QuickStart/Navigating_Time_Series_Data.html"
+Repository = "https://github.com/apache/tsfile"
+Issues = "https://github.com/apache/tsfile/issues"
+
+[tool.setuptools]
+package-dir = {"" = "."}
+
+[tool.setuptools.packages.find]
+where = ["."]
+include = ["tsfile*"]
+
+[tool.setuptools.package-data]
+tsfile = [
+    "*.pxd",
+    "*.pxi",
+    "*.so",
+    "*.so.*",
+    "*.dylib",
+    "*.dylib.*",
+    "*.dll",
+    "*.dll.a",
+    "*.lib",
+    "*.lib.a",
+    "include/**/*"
+]
diff --git a/python/requirements.txt b/python/requirements.txt
index 5b1c19aa2..dbfac3bca 100644
--- a/python/requirements.txt
+++ b/python/requirements.txt
@@ -18,8 +18,8 @@
 #
 
 cython==3.0.10
-numpy==1.26.4
-pandas==2.2.2
+numpy
+pandas
 setuptools==78.1.1
 wheel==0.46.2
 
diff --git a/python/setup.py b/python/setup.py
index 9f2a1a37a..51c794ca5 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -19,151 +19,120 @@
 import os
 import platform
 import shutil
-
+import sys
 import numpy as np
+
+from pathlib import Path
 from Cython.Build import cythonize
 from setuptools import setup, Extension
 from setuptools.command.build_ext import build_ext
 
-version = "2.2.1.dev"
-system = platform.system()
-
-
-def copy_tsfile_lib(source_dir, target_dir, suffix):
-    lib_file_name = f"libtsfile.{suffix}"
-    source = os.path.join(source_dir, lib_file_name)
-    target = os.path.join(target_dir, lib_file_name)
-
-    if os.path.exists(source):
-        shutil.copyfile(source, target)
-
-    if system == "Linux":
-        link_name = os.path.join(target_dir, "libtsfile.so")
-        if os.path.exists(link_name):
-            os.remove(link_name)
-        os.symlink(lib_file_name, link_name)
-    elif system == "Darwin":
-        link_name = os.path.join(target_dir, "libtsfile.dylib")
-        if os.path.exists(link_name):
-            os.remove(link_name)
-        os.symlink(lib_file_name, link_name)
-
-
-project_dir = os.path.dirname(os.path.abspath(__file__))
-tsfile_py_include = os.path.join(project_dir, "tsfile", "include")
-
-if os.path.exists(tsfile_py_include):
-    shutil.rmtree(tsfile_py_include)
-
-shutil.copytree(
-    os.path.join(project_dir, "..", "cpp", "target", "build", "include"),
-    os.path.join(tsfile_py_include, ""),
-)
-
-
-def copy_tsfile_header(source):
-    for file in source:
-        if os.path.exists(file):
-            target = os.path.join(tsfile_py_include, os.path.basename(file))
-            shutil.copyfile(file, target)
+ROOT = Path(__file__).parent.resolve()
+PKG = ROOT / "tsfile"
+CPP_OUT = ROOT / ".." / "cpp" / "target" / "build"
+CPP_LIB = CPP_OUT / "lib"
+CPP_INC = CPP_OUT / "include"
 
+version = "2.2.1"
+system = platform.system()
 
-## Copy C wrapper header.
-# tsfile/cpp/src/cwrapper/tsfile_cwrapper.h
-source_headers = [
-    os.path.join(project_dir, "..", "cpp", "src", "cwrapper", "tsfile_cwrapper.h"),
-]
-
-copy_tsfile_header(source_headers)
-
-## Copy shared library
-tsfile_shared_source_dir = os.path.join(project_dir, "..", "cpp", "target", "build", "lib")
-tsfile_shared_dir = os.path.join(project_dir, "tsfile")
-
-if system == "Darwin":
-    copy_tsfile_lib(tsfile_shared_source_dir, tsfile_shared_dir, version + ".dylib")
-elif system == "Linux":
-    copy_tsfile_lib(tsfile_shared_source_dir, tsfile_shared_dir, "so." + version)
+(PKG / "include").mkdir(exist_ok=True)
+if (PKG / "include").exists() and CPP_INC.exists():
+    shutil.rmtree(PKG / "include")
+    shutil.copytree(CPP_INC, PKG / "include")
+if sys.platform.startswith("linux"):
+    candidates = sorted(CPP_LIB.glob("libtsfile.so*"), key=lambda p: len(p.name), reverse=True)
+    if not candidates:
+        raise FileNotFoundError("missing libtsfile.so* in build output")
+    src = candidates[0]
+    dst = PKG / src.name
+    shutil.copy2(src, dst)
+    link_name = PKG / "libtsfile.so"
+    shutil.copy2(src, link_name)
+
+elif sys.platform == "darwin":
+    candidates = sorted(CPP_LIB.glob("libtsfile.*.dylib")) or list(CPP_LIB.glob("libtsfile.dylib"))
+    if not candidates:
+        raise FileNotFoundError("missing libtsfile*.dylib in build output")
+    src = candidates[0]
+    dst = PKG / src.name
+    shutil.copy2(src, dst)
+    link_name = PKG / "libtsfile.dylib"
+    shutil.copy2(src, link_name)
+elif sys.platform == "win32":
+    for base_name in ("libtsfile",):
+        dll_candidates = sorted(CPP_LIB.glob(f"{base_name}*.dll"), key=lambda p: len(p.name), reverse=True)
+        dll_a_candidates = sorted(CPP_LIB.glob(f"{base_name}*.dll.a"), key=lambda p: len(p.name), reverse=True)
+
+        if not dll_candidates:
+            raise FileNotFoundError(f"missing {base_name}*.dll in build output")
+        if not dll_a_candidates:
+            raise FileNotFoundError(f"missing {base_name}*.dll.a in build output")
+
+        dll_src = dll_candidates[0]
+        dll_a_src = dll_a_candidates[0]
+
+        shutil.copy2(dll_src, PKG / f"{base_name}.dll")
+        shutil.copy2(dll_a_src, PKG / f"{base_name}.dll.a")
 else:
-    copy_tsfile_lib(tsfile_shared_source_dir, tsfile_shared_dir, "dll")
-
-tsfile_include_dir = os.path.join(project_dir, "tsfile", "include")
-
-ext_modules_tsfile = [
-    # utils: from python to c or c to python.
-    Extension(
-        "tsfile.tsfile_py_cpp",
-        sources=[os.path.join("tsfile", "tsfile_py_cpp.pyx")],
-        libraries=["tsfile"],
-        library_dirs=[tsfile_shared_dir],
-        include_dirs=[tsfile_include_dir, np.get_include()],
-        runtime_library_dirs=[tsfile_shared_dir] if system != "Windows" else None,
-        extra_compile_args=(
-            ["-std=c++11"] if system != "Windows" else ["-std=c++11", "-DMS_WIN64"]
-        ),
-        language="c++",
-    ),
-    # query data and describe schema: tsfile reader module
-    Extension(
-        "tsfile.tsfile_reader",
-        sources=[os.path.join("tsfile", "tsfile_reader.pyx")],
-        libraries=["tsfile"],
-        library_dirs=[tsfile_shared_dir],
-        depends=[os.path.join("tsfile", "tsfile_py_cpp.pxd")],
-        include_dirs=[tsfile_include_dir, np.get_include()],
-        runtime_library_dirs=[tsfile_shared_dir] if system != "Windows" else None,
-        extra_compile_args=(
-            ["-std=c++11"] if system != "Windows" else ["-std=c++11", "-DMS_WIN64"]
-        ),
-        language="c++",
-    ),
-    # write data and register schema: tsfile writer module
-    Extension(
-        "tsfile.tsfile_writer",
-        sources=[os.path.join("tsfile", "tsfile_writer.pyx")],
-        libraries=["tsfile"],
-        library_dirs=[tsfile_shared_dir],
-        depends=[os.path.join("tsfile", "tsfile_py_cpp.pxd")],
-        include_dirs=[tsfile_include_dir, np.get_include()],
-        runtime_library_dirs=[tsfile_shared_dir] if system != "Windows" else None,
-        extra_compile_args=(
-            ["-std=c++11"] if system != "Windows" else ["-std=c++11", "-DMS_WIN64"]
-        ),
-        language="c++",
-    )
-]
+    raise RuntimeError(f"Unsupported platform: {sys.platform}")
 
 
 class BuildExt(build_ext):
-    def build_extensions(self):
-        numpy_include = np.get_include()
-        for ext in self.extensions:
-            ext.include_dirs.append(numpy_include)
-        super().build_extensions()
+    def run(self):
+        super().run()
 
     def finalize_options(self):
-        if system == "Windows":
+        if sys.platform == "win32":
             self.compiler = "mingw32"
         super().finalize_options()
 
 
+extra_compile_args = []
+extra_link_args = []
+runtime_library_dirs = []
+libraries = []
+library_dirs = [str(PKG)]
+include_dirs = [str(PKG), np.get_include(), str(PKG / "include")]
+
+if sys.platform.startswith("linux"):
+    libraries = ["tsfile"]
+    extra_compile_args += ["-O3", "-std=c++11", "-fvisibility=hidden", "-fPIC"]
+    runtime_library_dirs = ["$ORIGIN"]
+    extra_link_args += ["-Wl,-rpath,$ORIGIN"]
+elif sys.platform == "darwin":
+    libraries = ["tsfile"]
+    extra_compile_args += ["-O3", "-std=c++11", "-fvisibility=hidden", "-fPIC"]
+    extra_link_args += ["-Wl,-rpath,@loader_path", "-stdlib=libc++"]
+elif sys.platform == "win32":
+    libraries = ["Tsfile"]
+    extra_compile_args += ["-O2", "-std=c++11", "-DSIZEOF_VOID_P=8", "-D__USE_MINGW_ANSI_STDIO=1", "-DMS_WIN64",
+                           "-D_WIN64"]
+else:
+    raise RuntimeError(f"Unsupported platform: {sys.platform}")
+
+common = dict(
+    language="c++",
+    include_dirs=include_dirs,
+    library_dirs=library_dirs,
+    libraries=libraries,
+    extra_compile_args=extra_compile_args,
+    extra_link_args=extra_link_args,
+    runtime_library_dirs=runtime_library_dirs,
+)
+
+exts = [
+    Extension("tsfile.tsfile_py_cpp", ["tsfile/tsfile_py_cpp.pyx"], **common),
+    Extension("tsfile.tsfile_reader", ["tsfile/tsfile_reader.pyx"], **common),
+    Extension("tsfile.tsfile_writer", ["tsfile/tsfile_writer.pyx"], **common),
+]
+
 setup(
     name="tsfile",
-    version=version,
-    description="Tsfile reader and writer for python",
-    url="https://tsfile.apache.org",
-    author='"Apache TsFile"',
+    version="2.1.0",
     packages=["tsfile"],
-    license="Apache 2.0",
-    ext_modules=cythonize(ext_modules_tsfile),
-    cmdclass={"build_ext": BuildExt},
-    include_dirs=[np.get_include()],
-    package_dir={"tsfile": "./tsfile"},
-    package_data={
-        "tsfile": [
-            "libtsfile.*",
-            "*.pxd"
-        ]
-    },
+    package_dir={"": "."},
     include_package_data=True,
+    ext_modules=cythonize(exts, compiler_directives={"language_level": 3}),
+    cmdclass={"build_ext": BuildExt},
 )
diff --git a/python/tsfile/__init__.py b/python/tsfile/__init__.py
index a9237257b..aaa61a2cd 100644
--- a/python/tsfile/__init__.py
+++ b/python/tsfile/__init__.py
@@ -19,9 +19,15 @@
 import ctypes
 import os
 import platform
-system = platform.system()
-if system == "Windows":
-    ctypes.WinDLL(os.path.join(os.path.dirname(__file__), "libtsfile.dll"), winmode=0)
+import sys
+
+if sys.platform == "win32":
+    _pkg_dir = os.path.dirname(os.path.abspath(__file__))
+    try:
+        os.add_dll_directory(_pkg_dir)
+    except (OSError, AttributeError):
+        pass
+    os.environ["PATH"] = _pkg_dir + os.pathsep + os.environ.get("PATH", "")
 
 from .constants import *
 from .schema import *
diff --git a/python/tsfile/tsfile_cpp.pxd b/python/tsfile/tsfile_cpp.pxd
index 9c65fb26f..f90b23089 100644
--- a/python/tsfile/tsfile_cpp.pxd
+++ b/python/tsfile/tsfile_cpp.pxd
@@ -22,7 +22,7 @@ from libc.stdint cimport uint32_t, int32_t, int64_t, uint64_t, uint8_t
 ctypedef int32_t ErrorCode
 
 # import symbols from tsfile_cwrapper.h
-cdef extern from "./tsfile_cwrapper.h":
+cdef extern from "cwrapper/tsfile_cwrapper.h":
     # common
     ctypedef int64_t timestamp
 
@@ -215,7 +215,7 @@ cdef extern from "./tsfile_cwrapper.h":
 
 
 
-cdef extern from "./common/config/config.h" namespace "common":
+cdef extern from "common/config/config.h" namespace "common":
     cdef cppclass ConfigValue:
         uint32_t tsblock_mem_inc_step_size_
         uint32_t tsblock_max_memory_
@@ -237,7 +237,7 @@ cdef extern from "./common/config/config.h" namespace "common":
         uint8_t string_encoding_type_;
         uint8_t default_compression_type_;
 
-cdef extern from "./common/global.h" namespace "common":
+cdef extern from "common/global.h" namespace "common":
     ConfigValue g_config_value_
     int set_datatype_encoding(uint8_t data_type, uint8_t encoding)
     int set_global_compression(uint8_t compression)


(tsfile) 03/03: support release on ci.

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

colinlee pushed a commit to branch support_release_for_win
in repository https://gitbox.apache.org/repos/asf/tsfile.git

commit 5583db7aa290df7cb08448803587a285b0d5f066
Author: ColinLee <sh...@163.com>
AuthorDate: Wed Mar 11 23:00:38 2026 +0800

    support release on ci.
---
 .github/workflows/wheels.yml | 146 +++++++++++++++++++++++++++++++++++--------
 1 file changed, 121 insertions(+), 25 deletions(-)

diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml
index 70a364385..ca66ff41b 100644
--- a/.github/workflows/wheels.yml
+++ b/.github/workflows/wheels.yml
@@ -1,14 +1,6 @@
 name: Build TsFile wheels(multi-platform)
 
 on:
-  push:
-    branches:
-      - "release_v*.*.*"
-  pull_request:
-    paths:
-      - "cpp/**"
-      - "python/**"
-      - ".github/**"
   workflow_dispatch:
 
 jobs:
@@ -38,11 +30,7 @@ jobs:
             os: macos-latest 
             platform: macos
             cibw_archs_macos: "arm64"
-#          currently, compile on windows is not supported for cibuildwheel
-#          - name: windows-amd64
-#            os: windows-2022
-#            platform: windows
-#            cibw_archs_windows: "AMD64"
+#          Windows is handled by the build-windows job below
     
     steps:
       - name: Checkout
@@ -74,16 +62,6 @@ jobs:
           python -m pip install -U pip wheel
           python -m pip install cibuildwheel==2.21.3
 
-#      - name: Build C++ core via Maven(win)
-#        if: matrix.platform == 'windows'
-#        shell: bash
-#        run: |
-#          set -euxo pipefail
-#          chmod +x mvnw || true
-#          ./mvnw -Pwith-cpp clean verify package \
-#            -DskipTests -Dspotless.check.skip=true -Dspotless.apply.skip=true
-#          test -d cpp/target/build/lib
-#          test -d cpp/target/build/include
       
       - name: Build C++ core via Maven (macOS)
         if: matrix.platform == 'macos'
@@ -165,5 +143,123 @@ jobs:
         with:
           name: tsfile-wheels-${{ matrix.name }}
           path: wheelhouse/*.whl
-    
-          
+
+  # ── Windows: build C++ once, then build wheels for each Python version ──
+  build-windows-cpp:
+    name: Build C++ core (Windows)
+    runs-on: windows-2022
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v4
+        with:
+          submodules: false
+          fetch-depth: 0
+
+      - name: Set up Java 17
+        uses: actions/setup-java@v4
+        with:
+          distribution: temurin
+          java-version: "17"
+
+      - name: Set up MSYS2 / MinGW
+        uses: msys2/setup-msys2@v2
+        with:
+          msystem: MINGW64
+          update: true
+          install: >-
+            mingw-w64-x86_64-gcc
+            mingw-w64-x86_64-cmake
+            mingw-w64-x86_64-make
+            make
+
+      - name: Build C++ core via Maven
+        shell: msys2 {0}
+        run: |
+          set -euxo pipefail
+          export PATH="/c/Program Files/Eclipse Adoptium/jdk-17*/bin:$PATH"
+          java -version
+          chmod +x mvnw || true
+          ./mvnw -Pwith-cpp clean verify package \
+            -DskipTests -Dspotless.check.skip=true -Dspotless.apply.skip=true
+          test -d cpp/target/build/lib
+          test -d cpp/target/build/include
+
+      - name: Upload C++ build output
+        uses: actions/upload-artifact@v4
+        with:
+          name: tsfile-cpp-windows
+          path: |
+            cpp/target/build/lib/
+            cpp/target/build/include/
+
+  build-windows-wheels:
+    name: Build wheel (Windows, Python ${{ matrix.python-version }})
+    needs: build-windows-cpp
+    runs-on: windows-2022
+    strategy:
+      fail-fast: false
+      matrix:
+        python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v4
+        with:
+          submodules: false
+          fetch-depth: 0
+
+      - name: Set up Python ${{ matrix.python-version }}
+        uses: actions/setup-python@v4
+        with:
+          python-version: ${{ matrix.python-version }}
+
+      - name: Set up Java 17
+        uses: actions/setup-java@v4
+        with:
+          distribution: temurin
+          java-version: "17"
+
+      - name: Set up MSYS2 / MinGW
+        uses: msys2/setup-msys2@v2
+        with:
+          msystem: MINGW64
+          update: false
+          install: >-
+            mingw-w64-x86_64-gcc
+            mingw-w64-x86_64-make
+            make
+
+      - name: Download C++ build output
+        uses: actions/download-artifact@v4
+        with:
+          name: tsfile-cpp-windows
+          path: cpp/target/build/
+
+      - name: Build wheel
+        shell: msys2 {0}
+        run: |
+          set -euxo pipefail
+          PYEXE=$(cygpath "$(which python)")
+          export PATH="/c/Program Files/Eclipse Adoptium/jdk-17*/bin:$PATH"
+
+          # Install Python build dependencies
+          python -m pip install --upgrade pip
+          python -m pip install -r python/requirements.txt
+
+          # Build wheel via Maven (skip C++ rebuild, only python package)
+          chmod +x mvnw || true
+          cd python
+          python setup.py bdist_wheel
+          ls -la dist/
+
+      - name: Verify wheel
+        shell: bash
+        run: |
+          python -m pip install python/dist/*.whl
+          python -c "import tsfile, tsfile.tsfile_reader as r; print('import-ok')"
+
+      - name: Upload wheel
+        uses: actions/upload-artifact@v4
+        with:
+          name: tsfile-wheels-windows-py${{ matrix.python-version }}
+          path: python/dist/*.whl
+


(tsfile) 01/03: fix some err.

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

colinlee pushed a commit to branch support_release_for_win
in repository https://gitbox.apache.org/repos/asf/tsfile.git

commit bfa95c8e32393f6dd4a0141768c67d02c3d52ed6
Author: ColinLee <sh...@163.com>
AuthorDate: Mon Mar 9 13:28:10 2026 +0800

    fix some err.
---
 cpp/1761643915818-1-0-0.tsfile                     | Bin 0 -> 175694 bytes
 cpp/CMakeLists.txt                                 |   4 +
 cpp/src/common/path.h                              |  10 +-
 .../reader/tree_view/tsfile_reader_tree_test.cc    |  54 ++++++
 cpp/third_party/zlib-1.3.1/treebuild.xml           | 188 ++++++++++-----------
 .../zlib-1.3.1/zlib-1.3.1/treebuild.xml            | 188 ++++++++++-----------
 python/tests/test_dataframe.py                     |   5 +
 7 files changed, 254 insertions(+), 195 deletions(-)

diff --git a/cpp/1761643915818-1-0-0.tsfile b/cpp/1761643915818-1-0-0.tsfile
new file mode 100644
index 000000000..1c0c26495
Binary files /dev/null and b/cpp/1761643915818-1-0-0.tsfile differ
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index c85150d8f..45e630101 100755
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -143,6 +143,10 @@ if (ENABLE_ZLIB)
     add_definitions(-DENABLE_GZIP)
 endif()
 
+if (ENABLE_ANTLR4)
+    add_definitions(-DENABLE_ANTLR4)
+endif()
+
 # All libs will be stored here, including libtsfile, compress-encoding lib.
 set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
 
diff --git a/cpp/src/common/path.h b/cpp/src/common/path.h
index 55abf810d..23b37c4be 100644
--- a/cpp/src/common/path.h
+++ b/cpp/src/common/path.h
@@ -57,9 +57,13 @@ struct Path {
                     IDeviceID::split_string(path_sc, '.');
 #endif
                 if (nodes.size() > 1) {
-                    device_id_ = std::make_shared<StringArrayDeviceID>(
-                        std::vector<std::string>(nodes.begin(),
-                                                 nodes.end() - 1));
+                    std::string device_str;
+                    for (size_t j = 0; j + 1 < nodes.size(); ++j) {
+                        if (j > 0) device_str += ".";
+                        device_str += nodes[j];
+                    }
+                    device_id_ =
+                        std::make_shared<StringArrayDeviceID>(device_str);
                     measurement_ = nodes[nodes.size() - 1];
                     full_path_ =
                         device_id_->get_device_name() + "." + measurement_;
diff --git a/cpp/test/reader/tree_view/tsfile_reader_tree_test.cc b/cpp/test/reader/tree_view/tsfile_reader_tree_test.cc
index ffcaa20fa..84b994dfc 100644
--- a/cpp/test/reader/tree_view/tsfile_reader_tree_test.cc
+++ b/cpp/test/reader/tree_view/tsfile_reader_tree_test.cc
@@ -410,3 +410,57 @@ TEST_F(TsFileTreeReaderTest, ExtendedRowsAndColumnsTest) {
         delete measurement;
     }
 }
+
+TEST_F(TsFileTreeReaderTest, ExtendedRowsAndColumnsTest1) {
+    TsFileTreeReader reader;
+    reader.open("/Users/colin/dev/tsfile/cpp/1761643915818-1-0-0.tsfile");
+    auto read_device_ids = reader.get_all_device_ids();
+    ResultSet* result;
+    int ret =
+        reader.query({"root.sensors.TH"}, {"t", "h"}, 0, INT64_MAX, result);
+    ASSERT_EQ(ret, E_OK);
+    auto iter = result->iterator();
+    int row_count = 0;
+
+    while (iter.hasNext()) {
+        RowRecord* read_record = iter.next();
+        row_count++;
+
+        // device_id1
+        for (size_t i = 0; i < 2; ++i) {
+            Field* field = read_record->get_field(i + 1);
+            ASSERT_NE(field, nullptr);
+
+            int64_t timestamp = read_record->get_timestamp();
+            int row_index = timestamp / 1000;
+
+            switch (field->type_) {
+                case INT64: {
+                    EXPECT_EQ(field->get_value<int64_t>(),
+                              static_cast<int64_t>(row_index + i));
+                    break;
+                }
+                case DOUBLE: {
+                    EXPECT_NEAR(field->get_value<double>(), row_index * 1.5 +
+                    i,
+                                0.001);
+                    break;
+                }
+                case FLOAT: {
+                    EXPECT_NEAR(field->get_value<float>(), row_index * 0.8f +
+                    i,
+                                0.001f);
+                    break;
+                }
+                case INT32: {
+                    EXPECT_EQ(field->get_value<int32_t>(),
+                              static_cast<int32_t>(row_index * 2 + i));
+                    break;
+                }
+                default:
+                    break;
+            }
+        }
+    }
+
+}
diff --git a/cpp/third_party/zlib-1.3.1/treebuild.xml b/cpp/third_party/zlib-1.3.1/treebuild.xml
index 930b00be4..8e030572a 100644
--- a/cpp/third_party/zlib-1.3.1/treebuild.xml
+++ b/cpp/third_party/zlib-1.3.1/treebuild.xml
@@ -1,103 +1,99 @@
-<?xml version="1.0" ?>
+<?xml version="1.0" encoding="UTF-8"?>
 <package name="zlib" version="1.3.1">
     <library name="zlib" dlversion="1.3.1" dlname="z">
-	<property name="description"> zip compression library </property>
-	<property name="include-target-dir" value="$(@PACKAGE/install-includedir)" />
-
-	<!-- fixme: not implemented yet -->
-	<property name="compiler/c/inline" value="yes" />
-
-	<include-file name="zlib.h" scope="public" mode="644" />
-	<include-file name="zconf.h" scope="public" mode="644" />
-
-	<source name="adler32.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	</source>
-	<source name="compress.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	</source>
-	<source name="crc32.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="crc32.h" />
-	</source>
-	<source name="gzclose.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="gzguts.h" />
-	</source>
-	<source name="gzlib.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="gzguts.h" />
-	</source>
-	<source name="gzread.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="gzguts.h" />
-	</source>
-	<source name="gzwrite.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="gzguts.h" />
-	</source>
-	<source name="uncompr.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	</source>
-	<source name="deflate.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="zutil.h" />
-	    <depend name="deflate.h" />
-	</source>
-	<source name="trees.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="zutil.h" />
-	    <depend name="deflate.h" />
-	    <depend name="trees.h" />
-	</source>
-	<source name="zutil.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="zutil.h" />
-	</source>
-	<source name="inflate.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="zutil.h" />
-	    <depend name="inftrees.h" />
-	    <depend name="inflate.h" />
-	    <depend name="inffast.h" />
-	</source>
-	<source name="infback.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="zutil.h" />
-	    <depend name="inftrees.h" />
-	    <depend name="inflate.h" />
-	    <depend name="inffast.h" />
-	</source>
-	<source name="inftrees.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="zutil.h" />
-	    <depend name="inftrees.h" />
-	</source>
-	<source name="inffast.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="zutil.h" />
-	    <depend name="inftrees.h" />
-	    <depend name="inflate.h" />
-	    <depend name="inffast.h" />
-	</source>
+        <property name="description">zip compression library</property>
+        <property name="include-target-dir" value="$(@PACKAGE/install-includedir)"/>
+        <!-- fixme: not implemented yet -->
+        <property name="compiler/c/inline" value="yes"/>
+        <include-file name="zlib.h" scope="public" mode="644"/>
+        <include-file name="zconf.h" scope="public" mode="644"/>
+        <source name="adler32.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+        </source>
+        <source name="compress.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+        </source>
+        <source name="crc32.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="crc32.h"/>
+        </source>
+        <source name="gzclose.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="gzguts.h"/>
+        </source>
+        <source name="gzlib.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="gzguts.h"/>
+        </source>
+        <source name="gzread.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="gzguts.h"/>
+        </source>
+        <source name="gzwrite.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="gzguts.h"/>
+        </source>
+        <source name="uncompr.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+        </source>
+        <source name="deflate.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="zutil.h"/>
+            <depend name="deflate.h"/>
+        </source>
+        <source name="trees.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="zutil.h"/>
+            <depend name="deflate.h"/>
+            <depend name="trees.h"/>
+        </source>
+        <source name="zutil.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="zutil.h"/>
+        </source>
+        <source name="inflate.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="zutil.h"/>
+            <depend name="inftrees.h"/>
+            <depend name="inflate.h"/>
+            <depend name="inffast.h"/>
+        </source>
+        <source name="infback.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="zutil.h"/>
+            <depend name="inftrees.h"/>
+            <depend name="inflate.h"/>
+            <depend name="inffast.h"/>
+        </source>
+        <source name="inftrees.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="zutil.h"/>
+            <depend name="inftrees.h"/>
+        </source>
+        <source name="inffast.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="zutil.h"/>
+            <depend name="inftrees.h"/>
+            <depend name="inflate.h"/>
+            <depend name="inffast.h"/>
+        </source>
     </library>
 </package>
-
 <!--
 CFLAGS=-O
 #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
diff --git a/cpp/third_party/zlib-1.3.1/zlib-1.3.1/treebuild.xml b/cpp/third_party/zlib-1.3.1/zlib-1.3.1/treebuild.xml
index 930b00be4..8e030572a 100644
--- a/cpp/third_party/zlib-1.3.1/zlib-1.3.1/treebuild.xml
+++ b/cpp/third_party/zlib-1.3.1/zlib-1.3.1/treebuild.xml
@@ -1,103 +1,99 @@
-<?xml version="1.0" ?>
+<?xml version="1.0" encoding="UTF-8"?>
 <package name="zlib" version="1.3.1">
     <library name="zlib" dlversion="1.3.1" dlname="z">
-	<property name="description"> zip compression library </property>
-	<property name="include-target-dir" value="$(@PACKAGE/install-includedir)" />
-
-	<!-- fixme: not implemented yet -->
-	<property name="compiler/c/inline" value="yes" />
-
-	<include-file name="zlib.h" scope="public" mode="644" />
-	<include-file name="zconf.h" scope="public" mode="644" />
-
-	<source name="adler32.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	</source>
-	<source name="compress.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	</source>
-	<source name="crc32.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="crc32.h" />
-	</source>
-	<source name="gzclose.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="gzguts.h" />
-	</source>
-	<source name="gzlib.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="gzguts.h" />
-	</source>
-	<source name="gzread.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="gzguts.h" />
-	</source>
-	<source name="gzwrite.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="gzguts.h" />
-	</source>
-	<source name="uncompr.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	</source>
-	<source name="deflate.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="zutil.h" />
-	    <depend name="deflate.h" />
-	</source>
-	<source name="trees.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="zutil.h" />
-	    <depend name="deflate.h" />
-	    <depend name="trees.h" />
-	</source>
-	<source name="zutil.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="zutil.h" />
-	</source>
-	<source name="inflate.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="zutil.h" />
-	    <depend name="inftrees.h" />
-	    <depend name="inflate.h" />
-	    <depend name="inffast.h" />
-	</source>
-	<source name="infback.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="zutil.h" />
-	    <depend name="inftrees.h" />
-	    <depend name="inflate.h" />
-	    <depend name="inffast.h" />
-	</source>
-	<source name="inftrees.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="zutil.h" />
-	    <depend name="inftrees.h" />
-	</source>
-	<source name="inffast.c">
-	    <depend name="zlib.h" />
-	    <depend name="zconf.h" />
-	    <depend name="zutil.h" />
-	    <depend name="inftrees.h" />
-	    <depend name="inflate.h" />
-	    <depend name="inffast.h" />
-	</source>
+        <property name="description">zip compression library</property>
+        <property name="include-target-dir" value="$(@PACKAGE/install-includedir)"/>
+        <!-- fixme: not implemented yet -->
+        <property name="compiler/c/inline" value="yes"/>
+        <include-file name="zlib.h" scope="public" mode="644"/>
+        <include-file name="zconf.h" scope="public" mode="644"/>
+        <source name="adler32.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+        </source>
+        <source name="compress.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+        </source>
+        <source name="crc32.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="crc32.h"/>
+        </source>
+        <source name="gzclose.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="gzguts.h"/>
+        </source>
+        <source name="gzlib.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="gzguts.h"/>
+        </source>
+        <source name="gzread.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="gzguts.h"/>
+        </source>
+        <source name="gzwrite.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="gzguts.h"/>
+        </source>
+        <source name="uncompr.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+        </source>
+        <source name="deflate.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="zutil.h"/>
+            <depend name="deflate.h"/>
+        </source>
+        <source name="trees.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="zutil.h"/>
+            <depend name="deflate.h"/>
+            <depend name="trees.h"/>
+        </source>
+        <source name="zutil.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="zutil.h"/>
+        </source>
+        <source name="inflate.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="zutil.h"/>
+            <depend name="inftrees.h"/>
+            <depend name="inflate.h"/>
+            <depend name="inffast.h"/>
+        </source>
+        <source name="infback.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="zutil.h"/>
+            <depend name="inftrees.h"/>
+            <depend name="inflate.h"/>
+            <depend name="inffast.h"/>
+        </source>
+        <source name="inftrees.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="zutil.h"/>
+            <depend name="inftrees.h"/>
+        </source>
+        <source name="inffast.c">
+            <depend name="zlib.h"/>
+            <depend name="zconf.h"/>
+            <depend name="zutil.h"/>
+            <depend name="inftrees.h"/>
+            <depend name="inflate.h"/>
+            <depend name="inffast.h"/>
+        </source>
     </library>
 </package>
-
 <!--
 CFLAGS=-O
 #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
diff --git a/python/tests/test_dataframe.py b/python/tests/test_dataframe.py
index e40ff32a0..555f01adb 100644
--- a/python/tests/test_dataframe.py
+++ b/python/tests/test_dataframe.py
@@ -333,3 +333,8 @@ def test_validate_dataframe_none_column_name():
     df = pd.DataFrame([[1, 2]], columns=[None, "value"])
     with pytest.raises(ValueError, match="Column name cannot be None or empty"):
         validate_dataframe_for_tsfile(df)
+
+
+def test_to_dataframe_test():
+    df = to_dataframe("/Users/colin/dev/tsfile/cpp/1761643915818-1-0-0.tsfile")
+    print(df)