This is an automated email from the ASF dual-hosted git repository. colinlee pushed a commit to branch rc_release_2.2.0 in repository https://gitbox.apache.org/repos/asf/tsfile.git
commit 06bb7a48a3349d89afb0fe4f871bc85c503adcaa Author: ColinLee <[email protected]> AuthorDate: Mon Oct 20 15:12:51 2025 +0800 Add workflow for python release. --- .github/workflows/unit-test-cpp.yml | 11 +- .github/workflows/unit-test-python.yml | 11 ++ .github/workflows/wheels.yml | 169 +++++++++++++++++++++++++++ cpp/src/CMakeLists.txt | 111 +++--------------- cpp/test/CMakeLists.txt | 58 ++------- pom.xml | 11 +- python/how_to_build_and_release_py_tsfile.md | 28 +++++ python/pom.xml | 18 +++ python/pyproject.toml | 2 +- python/requirements.txt | 4 +- python/setup.py | 2 +- python/tsfile/__init__.py | 4 - python/tsfile/tsfile_cpp.pxd | 6 +- 13 files changed, 275 insertions(+), 160 deletions(-) diff --git a/.github/workflows/unit-test-cpp.yml b/.github/workflows/unit-test-cpp.yml index 1299f0e7..429e0b95 100644 --- a/.github/workflows/unit-test-cpp.yml +++ b/.github/workflows/unit-test-cpp.yml @@ -78,7 +78,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 # Setup caching of the artifacts in the .m2 directory, so they don't have to # all be downloaded again for every build. @@ -104,15 +104,18 @@ jobs: core.setOutput('platform_suffix', ``) } - # Install dependencies - 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 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 - sudo apt-get install -y uuid-dev elif [[ "$RUNNER_OS" == "Windows" ]]; then choco install llvm --version 17.0.6 --force else diff --git a/.github/workflows/unit-test-python.yml b/.github/workflows/unit-test-python.yml index 7307ac99..ae400a55 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 00000000..6e9dacec --- /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-13 + platform: macos + cibw_archs_macos: "x86_64" + + - name: macos-arm64 + os: macos-14 + 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/src/CMakeLists.txt b/cpp/src/CMakeLists.txt index e922836b..3d2d292f 100644 --- a/cpp/src/CMakeLists.txt +++ b/cpp/src/CMakeLists.txt @@ -25,74 +25,28 @@ if(POLICY CMP0079) cmake_policy(SET CMP0079 NEW) endif() -option(ENABLE_SNAPPY "Enable Google Snappy compression" ON) -message("cmake using: ENABLE_SNAPPY=${ENABLE_SNAPPY}") - -option(ENABLE_LZ4 "Enable LZ4 compression" ON) -message("cmake using: ENABLE_LZ4=${ENABLE_LZ4}") - -option(ENABLE_LZOKAY "Enable LZOKAY compression" ON) -message("cmake using: ENABLE_LZOKAY=${ENABLE_LZOKAY}") - -option(ENABLE_ZLIB "Enable Zlib compression" ON) -message("cmake using: ENABLE_ZLIB=${ENABLE_ZLIB}") - message("Running in src directory") if (${COV_ENABLED}) add_compile_options(-fprofile-arcs -ftest-coverage) endif () +add_definitions(-DANTLR4CPP_STATIC) +set(ANTLR4_WITH_STATIC_CRT OFF) -if (ENABLE_ANTLR4) - add_definitions(-DANTLR4CPP_STATIC) - set(ANTLR4_WITH_STATIC_CRT OFF) - message("ANTLR4 is enabled, adding ANTLR4 definitions") -else() - message("ANTLR4 is disabled") -endif() set(PROJECT_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src + ${THIRD_PARTY_INCLUDE}/google_snappy + ${THIRD_PARTY_INCLUDE}/zlib-1.2.13 + ${CMAKE_SOURCE_DIR}/third_party/lz4 + ${CMAKE_SOURCE_DIR}/third_party/lzokay + ${CMAKE_SOURCE_DIR}/third_party/zlib-1.2.13 + ${CMAKE_SOURCE_DIR}/third_party/google_snappy + ${CMAKE_SOURCE_DIR}/third_party/antlr4-cpp-runtime-4/runtime/src ) -if (ENABLE_SNAPPY) - list(APPEND PROJECT_INCLUDE_DIR - ${THIRD_PARTY_INCLUDE}/google_snappy - ${CMAKE_SOURCE_DIR}/third_party/google_snappy - ) -endif() - -if (ENABLE_LZ4) - list(APPEND PROJECT_INCLUDE_DIR - ${CMAKE_SOURCE_DIR}/third_party/lz4 - ) -endif() - -if (ENABLE_LZOKAY) - list(APPEND PROJECT_INCLUDE_DIR - ${CMAKE_SOURCE_DIR}/third_party/lzokay - ) -endif() - -if (ENABLE_ZLIB) - list(APPEND PROJECT_INCLUDE_DIR - ${CMAKE_SOURCE_DIR}/third_party/zlib-1.2.13 - ) -endif() - -if (ENABLE_ANTLR4) - list(APPEND PROJECT_INCLUDE_DIR - ${CMAKE_SOURCE_DIR}/third_party/antlr4-cpp-runtime-4/runtime/src - ) - message("Adding ANTLR4 include directory") -endif() - include_directories(${PROJECT_INCLUDE_DIR}) -if (ENABLE_ANTLR4) - add_subdirectory(parser) - message("Adding parser subdirectory") -endif() - +add_subdirectory(parser) add_subdirectory(common) add_subdirectory(compress) add_subdirectory(cwrapper) @@ -102,54 +56,24 @@ add_subdirectory(reader) add_subdirectory(utils) add_subdirectory(writer) -set(COMPRESSION_LIBS "") - -if (ENABLE_SNAPPY) - list(APPEND COMPRESSION_LIBS snappy) -endif() - -if (ENABLE_LZ4) - list(APPEND COMPRESSION_LIBS LZ4) -endif() - -if (ENABLE_LZOKAY) - list(APPEND COMPRESSION_LIBS lzokay) -endif() - -if (ENABLE_ZLIB) - list(APPEND COMPRESSION_LIBS zlibstatic) -endif() - -message("Compression libraries: ${COMPRESSION_LIBS}") - -if (ENABLE_ANTLR4) - target_link_libraries(parser_obj antlr4_static) - message("Linking parser_obj with antlr4_static") -endif() +set(COMPRESSION_LIBS snappy LZ4 lzokay zlibstatic) +target_link_libraries(parser_obj antlr4_static) target_link_libraries(compress_obj ${COMPRESSION_LIBS}) target_link_libraries(common_obj ${COMPRESSION_LIBS}) target_link_libraries(read_obj ${COMPRESSION_LIBS}) target_link_libraries(write_obj ${COMPRESSION_LIBS}) add_library(tsfile SHARED) - if (${COV_ENABLED}) message("Enable code cov...") - if (ENABLE_ANTLR4) - target_link_libraries(tsfile common_obj compress_obj cwrapper_obj file_obj read_obj write_obj parser_obj -lgcov) - else() - target_link_libraries(tsfile common_obj compress_obj cwrapper_obj file_obj read_obj write_obj -lgcov) - endif() + target_link_libraries(tsfile common_obj compress_obj cwrapper_obj file_obj read_obj write_obj parser_obj -lgcov) else() message("Disable code cov...") - if (ENABLE_ANTLR4) - target_link_libraries(tsfile common_obj compress_obj cwrapper_obj file_obj read_obj write_obj parser_obj) - else() - target_link_libraries(tsfile common_obj compress_obj cwrapper_obj file_obj read_obj write_obj) - endif() + target_link_libraries(tsfile common_obj compress_obj cwrapper_obj file_obj read_obj write_obj parser_obj) endif() +# to trigger copy headers add_dependencies(tsfile utils_obj encoding_obj) set(LIBTSFILE_PROJECT_VERSION ${TsFile_CPP_VERSION}) @@ -157,4 +81,7 @@ set(LIBTSFILE_SO_VERSION ${TsFile_CPP_VERSION}) set_target_properties(tsfile PROPERTIES VERSION ${LIBTSFILE_PROJECT_VERSION}) set_target_properties(tsfile PROPERTIES SOVERSION ${LIBTSFILE_SO_VERSION}) -install(TARGETS tsfile LIBRARY DESTINATION ${LIBRARY_OUTPUT_PATH}) \ No newline at end of file +install(TARGETS tsfile LIBRARY DESTINATION ${LIBRARY_OUTPUT_PATH}) + + + diff --git a/cpp/test/CMakeLists.txt b/cpp/test/CMakeLists.txt index 423381e4..c4886641 100644 --- a/cpp/test/CMakeLists.txt +++ b/cpp/test/CMakeLists.txt @@ -70,6 +70,7 @@ else () return() endif () + message(STATUS "Adding test configurations...") set(LIB_TSFILE_SDK_DIR ${PROJECT_BINARY_DIR}/lib) @@ -78,29 +79,15 @@ message("LIB_TSFILE_SDK_DIR: ${LIB_TSFILE_SDK_DIR}") include_directories( ${LIBRARY_INCLUDE_DIR} ${THIRD_PARTY_INCLUDE} + ${THIRD_PARTY_INCLUDE}/google_snappy + ${THIRD_PARTY_INCLUDE}/zlib-1.2.13 + ${CMAKE_SOURCE_DIR}/third_party/lz4 + ${CMAKE_SOURCE_DIR}/third_party/google_snappy + ${CMAKE_SOURCE_DIR}/third_party/lzokay + ${CMAKE_SOURCE_DIR}/third_party/zlib-1.2.13 + ${CMAKE_SOURCE_DIR}/third_party/antlr4-cpp-runtime-4/runtime/src ) -if (ENABLE_SNAPPY) - include_directories(${THIRD_PARTY_INCLUDE}/google_snappy) - include_directories(${CMAKE_SOURCE_DIR}/third_party/google_snappy) -endif() - -if (ENABLE_LZ4) - include_directories(${CMAKE_SOURCE_DIR}/third_party/lz4) -endif() - -if (ENABLE_LZOKAY) - include_directories(${CMAKE_SOURCE_DIR}/third_party/lzokay) -endif() - -if (ENABLE_ZLIB) - include_directories(${CMAKE_SOURCE_DIR}/third_party/zlib-1.2.13) -endif() - -if (ENABLE_ANTLR4) - include_directories(${CMAKE_SOURCE_DIR}/third_party/antlr4-cpp-runtime-4/runtime/src) -endif() - enable_testing() file(GLOB_RECURSE TEST_SRCS @@ -109,40 +96,19 @@ file(GLOB_RECURSE TEST_SRCS "utils/*_test.cc" "file/*_test.cc" "parser/*_test.cc" + "compress/*_test.cc" "reader/*_test.cc" "writer/*_test.cc" "cwrapper/*_test.cc" ) -if (ENABLE_SNAPPY) - file(GLOB_RECURSE SNAPPY_TEST_SRCS "compress/*snappy*_test.cc") - list(APPEND TEST_SRCS ${SNAPPY_TEST_SRCS}) -endif() - -if (ENABLE_LZ4) - file(GLOB_RECURSE LZ4_TEST_SRCS "compress/*lz4*_test.cc") - list(APPEND TEST_SRCS ${LZ4_TEST_SRCS}) -endif() - -if (ENABLE_LZOKAY) - file(GLOB_RECURSE LZOKAY_TEST_SRCS "compress/*lzo*_test.cc") - list(APPEND TEST_SRCS ${LZOKAY_TEST_SRCS}) -endif() - -if (ENABLE_ZLIB) - file(GLOB_RECURSE ZLIB_TEST_SRCS "compress/*gzip*_test.cc") - list(APPEND TEST_SRCS ${ZLIB_TEST_SRCS}) -endif() - if (${COV_ENABLED}) message("Enable code cov...") add_compile_options(-fprofile-arcs -ftest-coverage) endif () -if (ENABLE_ANTLR4) - add_definitions(-DANTLR4CPP_STATIC) - set(ANTLR4_WITH_STATIC_CRT OFF) -endif() +add_definitions(-DANTLR4CPP_STATIC) +set(ANTLR4_WITH_STATIC_CRT OFF) add_executable(TsFile_Test ${TEST_SRCS}) target_link_libraries( @@ -165,4 +131,4 @@ if (WIN32) endif () include(GoogleTest) -gtest_discover_tests(TsFile_Test) \ No newline at end of file +gtest_discover_tests(TsFile_Test) diff --git a/pom.xml b/pom.xml index 208c5755..dbd4143b 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ </parent> <groupId>org.apache.tsfile</groupId> <artifactId>tsfile-parent</artifactId> - <version>2.1.4</version> + <version>2.2.0-SNAPSHOT</version> <packaging>pom</packaging> <name>Apache TsFile Project Parent POM</name> <properties> @@ -137,8 +137,6 @@ <exclude>**/third_party/**</exclude> <exclude>**/.python-version</exclude> <exclude>**/**venv-py**/**</exclude> - <exclude>**/.python-version</exclude> - <exclude>python/.python-version</exclude> </excludes> </configuration> </plugin> @@ -449,8 +447,6 @@ <indentSize>4</indentSize> <excludes> <exclude>**/target/**</exclude> - <exclude>python/.python-version</exclude> - <exclude>**/.python-version</exclude> </excludes> </configuration> </execution> @@ -593,6 +589,7 @@ <profile> <id>with-python</id> <modules> + <module>cpp</module> <module>python</module> </modules> </profile> @@ -756,8 +753,8 @@ <os.suffix>win</os.suffix> <os.classifier>windows-amd64</os.classifier> <cmake.generator>MinGW Makefiles</cmake.generator> - <python.venv.bin/> - <python.exe.bin>python.exe</python.exe.bin> + <python.venv.bin>venv/Scripts/</python.venv.bin> + <python.exe.bin>python</python.exe.bin> </properties> </profile> <!-- profile for windows aarch64 (mainly VM on newer Mac) (Self-Enabling) --> diff --git a/python/how_to_build_and_release_py_tsfile.md b/python/how_to_build_and_release_py_tsfile.md new file mode 100644 index 00000000..ea7cea42 --- /dev/null +++ b/python/how_to_build_and_release_py_tsfile.md @@ -0,0 +1,28 @@ +<!-- + + 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 on local + +## Build on docker + +## Build for release + +## Release TsFile to Pypi and Conda \ No newline at end of file diff --git a/python/pom.xml b/python/pom.xml index 59907c25..89bde909 100644 --- a/python/pom.xml +++ b/python/pom.xml @@ -75,6 +75,24 @@ </arguments> </configuration> </execution> + <execution> + <id>python-install-wheel</id> + <phase>validate</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <executable>${python.venv.bin}${python.exe.bin}</executable> + <arguments> + <argument>-m</argument> + <argument>pip</argument> + <argument>install</argument> + <argument>--only-binary=:all:</argument> + <argument>--no-deps</argument> + <argument>${project.basedir}/dist/tsfile-*.whl</argument> + </arguments> + </configuration> + </execution> <execution> <id>compile-python-code</id> <phase>compile</phase> diff --git a/python/pyproject.toml b/python/pyproject.toml index 09a80bdd..cb8d098d 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -28,7 +28,7 @@ build-backend = "setuptools.build_meta" [project] name = "tsfile" -version = "2.1.4" +version = "2.1.2" requires-python = ">=3.9" description = "TsFile Python" readme = {file = "README.md", content-type = "text/markdown"} diff --git a/python/requirements.txt b/python/requirements.txt index 06f90808..08baaac7 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.45.1 diff --git a/python/setup.py b/python/setup.py index f7b1f9bd..a80ef7eb 100644 --- a/python/setup.py +++ b/python/setup.py @@ -33,7 +33,7 @@ CPP_OUT = ROOT / ".." / "cpp" / "target" / "build" CPP_LIB = CPP_OUT / "lib" CPP_INC = CPP_OUT / "include" -version = "2.2.0.dev" +version = "2.1.2" system = platform.system() (PKG / "include").mkdir(exist_ok=True) diff --git a/python/tsfile/__init__.py b/python/tsfile/__init__.py index bf755fce..5b120c0d 100644 --- a/python/tsfile/__init__.py +++ b/python/tsfile/__init__.py @@ -19,10 +19,6 @@ 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) - from .constants import * from .schema import * from .row_record import * diff --git a/python/tsfile/tsfile_cpp.pxd b/python/tsfile/tsfile_cpp.pxd index 40bff4eb..1e803b9c 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 @@ -211,7 +211,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_ @@ -233,7 +233,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)
