From 17ca80cba3f40b6acf6cfafadaf8d9c5b350c355 Mon Sep 17 00:00:00 2001 From: Konstantinos Tsitsimpikos Date: Thu, 4 Sep 2025 14:24:17 -0400 Subject: [PATCH 01/20] External directory --- .github/workflows/build-wheels.yml | 6 +++++- tiledb/CMakeLists.txt | 15 ++++++++++++--- tiledb/libtiledb/CMakeLists.txt | 5 +++-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index bed1ba503f..f12847069d 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -50,16 +50,20 @@ jobs: uses: pypa/cibuildwheel@v2.23.3 env: CIBW_BUILD_VERBOSITY: 3 - CIBW_ENVIRONMENT_PASS_LINUX: SETUPTOOLS_SCM_PRETEND_VERSION_FOR_TILEDB S3_BUCKET TILEDB_TOKEN TILEDB_NAMESPACE + CIBW_ENVIRONMENT_PASS_LINUX: SETUPTOOLS_SCM_PRETEND_VERSION_FOR_TILEDB S3_BUCKET TILEDB_TOKEN TILEDB_NAMESPACE RUNNER_TEMP CIBW_ENVIRONMENT_MACOS: > CC=clang CXX=clang++ + RUNNER_TEMP=${{ runner.temp }} MACOSX_DEPLOYMENT_TARGET: "11.0" CIBW_ARCHS: all CIBW_PRERELEASE_PYTHONS: True CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} CIBW_MANYLINUX_X86_64_IMAGE: "manylinux_2_28" CIBW_MANYLINUX_AARCH64_IMAGE: "manylinux_2_28" + CIBW_REPAIR_WHEEL_COMMAND_LINUX: "bash -c 'if [ -n \"$RUNNER_TEMP\" ] && [ -d \"$RUNNER_TEMP/tiledb-external\" ]; then export LD_LIBRARY_PATH=\"$RUNNER_TEMP/tiledb-external:$LD_LIBRARY_PATH\"; fi; auditwheel repair -w {dest_dir} {wheel}'" + CIBW_REPAIR_WHEEL_COMMAND_MACOS: "bash -c 'if [ -n \"$RUNNER_TEMP\" ] && [ -d \"$RUNNER_TEMP/tiledb-external\" ]; then export DYLD_LIBRARY_PATH=\"$RUNNER_TEMP/tiledb-external:$DYLD_LIBRARY_PATH\"; fi; delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}'" + CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "powershell -Command \"if ($env:RUNNER_TEMP -and (Test-Path \\\"$env:RUNNER_TEMP\\tiledb-external\\\")) { $env:PATH = \\\"$env:RUNNER_TEMP\\tiledb-external;$env:PATH\\\" }; delvewheel repair -w {dest_dir} {wheel}\"" # __init__.py interferes with the tests and is included as local file instead of # used from wheels. To be honest, tests should not be in the source folder at all. CIBW_BEFORE_TEST: rm {project}/tiledb/__init__.py diff --git a/tiledb/CMakeLists.txt b/tiledb/CMakeLists.txt index 0ec03bbee0..3eaccf286b 100644 --- a/tiledb/CMakeLists.txt +++ b/tiledb/CMakeLists.txt @@ -39,10 +39,19 @@ endif() install(TARGETS main DESTINATION tiledb) if(TILEDB_DOWNLOADED) - message(STATUS "Adding \"libtiledb\" into install group") - - install(IMPORTED_RUNTIME_ARTIFACTS TileDB::tiledb_shared DESTINATION tiledb) + if(DEFINED ENV{RUNNER_TEMP}) + set(TILEDB_EXTERNAL_DIR "$ENV{RUNNER_TEMP}/tiledb-external") + else() + set(TILEDB_EXTERNAL_DIR "${CMAKE_BINARY_DIR}/_external/tiledb") + endif() + + message(STATUS "Installing TileDB to: ${TILEDB_EXTERNAL_DIR}") + + install(IMPORTED_RUNTIME_ARTIFACTS TileDB::tiledb_shared + DESTINATION "${TILEDB_EXTERNAL_DIR}") + + # Set RPATH to current directory so extensions can find the library if (APPLE) set_target_properties(main PROPERTIES INSTALL_RPATH "@loader_path") elseif(UNIX) diff --git a/tiledb/libtiledb/CMakeLists.txt b/tiledb/libtiledb/CMakeLists.txt index 59a63cda95..527365b65b 100644 --- a/tiledb/libtiledb/CMakeLists.txt +++ b/tiledb/libtiledb/CMakeLists.txt @@ -55,10 +55,11 @@ endif() install(TARGETS libtiledb DESTINATION tiledb) if(TILEDB_DOWNLOADED) + # Set RPATH to current directory so extensions can find the library if (APPLE) - set_target_properties(libtiledb PROPERTIES INSTALL_RPATH "@loader_path") + set_target_properties(libtiledb PROPERTIES INSTALL_RPATH "@loader_path") elseif(UNIX) - set_target_properties(libtiledb PROPERTIES INSTALL_RPATH "\$ORIGIN") + set_target_properties(libtiledb PROPERTIES INSTALL_RPATH "\$ORIGIN") endif() else() # If using external TileDB core library force it to be linked at runtime using RPATH From 37562d5c1b81ca006c15c4e484342e912f33d2e7 Mon Sep 17 00:00:00 2001 From: Konstantinos Tsitsimpikos Date: Thu, 4 Sep 2025 15:16:57 -0400 Subject: [PATCH 02/20] Library grafted - changing rpaths for test distr --- tiledb/CMakeLists.txt | 4 ++-- tiledb/libtiledb/CMakeLists.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tiledb/CMakeLists.txt b/tiledb/CMakeLists.txt index 3eaccf286b..9408e685be 100644 --- a/tiledb/CMakeLists.txt +++ b/tiledb/CMakeLists.txt @@ -53,9 +53,9 @@ if(TILEDB_DOWNLOADED) # Set RPATH to current directory so extensions can find the library if (APPLE) - set_target_properties(main PROPERTIES INSTALL_RPATH "@loader_path") + set_target_properties(main PROPERTIES INSTALL_RPATH "@loader_path/../tiledb.libs") elseif(UNIX) - set_target_properties(main PROPERTIES INSTALL_RPATH "\$ORIGIN") + set_target_properties(main PROPERTIES INSTALL_RPATH "\$ORIGIN/../tiledb.libs") endif() else() # If using external TileDB core library force it to be linked at runtime using RPATH diff --git a/tiledb/libtiledb/CMakeLists.txt b/tiledb/libtiledb/CMakeLists.txt index 527365b65b..f84ad3c115 100644 --- a/tiledb/libtiledb/CMakeLists.txt +++ b/tiledb/libtiledb/CMakeLists.txt @@ -57,9 +57,9 @@ install(TARGETS libtiledb DESTINATION tiledb) if(TILEDB_DOWNLOADED) # Set RPATH to current directory so extensions can find the library if (APPLE) - set_target_properties(libtiledb PROPERTIES INSTALL_RPATH "@loader_path") + set_target_properties(libtiledb PROPERTIES INSTALL_RPATH "@loader_path/../tiledb.libs/") elseif(UNIX) - set_target_properties(libtiledb PROPERTIES INSTALL_RPATH "\$ORIGIN") + set_target_properties(libtiledb PROPERTIES INSTALL_RPATH "\$ORIGIN/../tiledb.libs/") endif() else() # If using external TileDB core library force it to be linked at runtime using RPATH From fe0b04c16a530e79042623088f8c1660ea9ae82f Mon Sep 17 00:00:00 2001 From: Konstantinos Tsitsimpikos Date: Thu, 4 Sep 2025 16:37:05 -0400 Subject: [PATCH 03/20] Remove custom change of RPATH --- tiledb/CMakeLists.txt | 8 +------- tiledb/libtiledb/CMakeLists.txt | 9 +-------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/tiledb/CMakeLists.txt b/tiledb/CMakeLists.txt index 9408e685be..7141361b64 100644 --- a/tiledb/CMakeLists.txt +++ b/tiledb/CMakeLists.txt @@ -50,13 +50,7 @@ if(TILEDB_DOWNLOADED) install(IMPORTED_RUNTIME_ARTIFACTS TileDB::tiledb_shared DESTINATION "${TILEDB_EXTERNAL_DIR}") - - # Set RPATH to current directory so extensions can find the library - if (APPLE) - set_target_properties(main PROPERTIES INSTALL_RPATH "@loader_path/../tiledb.libs") - elseif(UNIX) - set_target_properties(main PROPERTIES INSTALL_RPATH "\$ORIGIN/../tiledb.libs") - endif() + else() # If using external TileDB core library force it to be linked at runtime using RPATH get_property(TILEDB_LOCATION TARGET TileDB::tiledb_shared PROPERTY LOCATION) diff --git a/tiledb/libtiledb/CMakeLists.txt b/tiledb/libtiledb/CMakeLists.txt index f84ad3c115..cc3a0ecbe9 100644 --- a/tiledb/libtiledb/CMakeLists.txt +++ b/tiledb/libtiledb/CMakeLists.txt @@ -54,14 +54,7 @@ endif() install(TARGETS libtiledb DESTINATION tiledb) -if(TILEDB_DOWNLOADED) - # Set RPATH to current directory so extensions can find the library - if (APPLE) - set_target_properties(libtiledb PROPERTIES INSTALL_RPATH "@loader_path/../tiledb.libs/") - elseif(UNIX) - set_target_properties(libtiledb PROPERTIES INSTALL_RPATH "\$ORIGIN/../tiledb.libs/") - endif() -else() +if(NOT TILEDB_DOWNLOADED) # If using external TileDB core library force it to be linked at runtime using RPATH get_property(TILEDB_LOCATION TARGET TileDB::tiledb_shared PROPERTY LOCATION) get_filename_component(TILEDB_LOCATION ${TILEDB_LOCATION} DIRECTORY) From 5cbb9efe61ce27effcb2d63c4e996c584e866042 Mon Sep 17 00:00:00 2001 From: Konstantinos Tsitsimpikos Date: Thu, 4 Sep 2025 16:54:54 -0400 Subject: [PATCH 04/20] Remove repair for windows --- .github/workflows/build-wheels.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index f12847069d..166b8cb318 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -63,7 +63,6 @@ jobs: CIBW_MANYLINUX_AARCH64_IMAGE: "manylinux_2_28" CIBW_REPAIR_WHEEL_COMMAND_LINUX: "bash -c 'if [ -n \"$RUNNER_TEMP\" ] && [ -d \"$RUNNER_TEMP/tiledb-external\" ]; then export LD_LIBRARY_PATH=\"$RUNNER_TEMP/tiledb-external:$LD_LIBRARY_PATH\"; fi; auditwheel repair -w {dest_dir} {wheel}'" CIBW_REPAIR_WHEEL_COMMAND_MACOS: "bash -c 'if [ -n \"$RUNNER_TEMP\" ] && [ -d \"$RUNNER_TEMP/tiledb-external\" ]; then export DYLD_LIBRARY_PATH=\"$RUNNER_TEMP/tiledb-external:$DYLD_LIBRARY_PATH\"; fi; delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}'" - CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "powershell -Command \"if ($env:RUNNER_TEMP -and (Test-Path \\\"$env:RUNNER_TEMP\\tiledb-external\\\")) { $env:PATH = \\\"$env:RUNNER_TEMP\\tiledb-external;$env:PATH\\\" }; delvewheel repair -w {dest_dir} {wheel}\"" # __init__.py interferes with the tests and is included as local file instead of # used from wheels. To be honest, tests should not be in the source folder at all. CIBW_BEFORE_TEST: rm {project}/tiledb/__init__.py From 79df74f156e33c0b28908fdb696342d4830ce0c2 Mon Sep 17 00:00:00 2001 From: Konstantinos Tsitsimpikos Date: Fri, 5 Sep 2025 12:48:58 -0400 Subject: [PATCH 05/20] Narrow down to ubuntu/macos --- .github/workflows/build-wheels.yml | 92 +++++++++++++++--------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 166b8cb318..63a3f9894f 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -33,7 +33,7 @@ jobs: - [ubuntu-24.04-arm, manylinux_aarch64] - [macos-13, macosx_x86_64] - [macos-14, macosx_arm64] - - [windows-2022, win_amd64] + # - [windows-2022, win_amd64] python: ["cp39", "cp310", "cp311", "cp312", "cp313"] steps: @@ -95,51 +95,51 @@ jobs: name: sdist path: dist/*.tar.gz - test_sdist: - name: Test source distribution package - needs: [build_sdist] - strategy: - matrix: - os: - - macos-13 - - macos-14 - - windows-2022 - - ubuntu-22.04 - - ubuntu-24.04-arm - python: ["3.9", "3.10", "3.11", "3.12", "3.13"] - runs-on: ${{ matrix.os }} - steps: - - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python }} - - - name: Download sdist artifact - uses: actions/download-artifact@v4 - with: - name: sdist - path: dist - - - name: Install sdist artifact - run: pip install --verbose dist/${{ needs.build_sdist.outputs.sdist_name }} - - - uses: actions/checkout@v4 - - - name: Install test dependencies - run: pip install pytest pytest-rerunfailures hypothesis psutil pyarrow - - - name: Run tests - shell: bash - run: | - PROJECT_CWD=$PWD - rm tiledb/__init__.py - cd .. - pytest -vv --showlocals $PROJECT_CWD - - - name: "Re-run tests without pandas" - run: | - pip uninstall -y pandas - pytest -vv --showlocals $PROJECT_CWD + # test_sdist: + # name: Test source distribution package + # needs: [build_sdist] + # strategy: + # matrix: + # os: + # - macos-13 + # - macos-14 + # - windows-2022 + # - ubuntu-22.04 + # - ubuntu-24.04-arm + # python: ["3.9", "3.10", "3.11", "3.12", "3.13"] + # runs-on: ${{ matrix.os }} + # steps: + # - name: Set up Python ${{ matrix.python }} + # uses: actions/setup-python@v5 + # with: + # python-version: ${{ matrix.python }} + + # - name: Download sdist artifact + # uses: actions/download-artifact@v4 + # with: + # name: sdist + # path: dist + + # - name: Install sdist artifact + # run: pip install --verbose dist/${{ needs.build_sdist.outputs.sdist_name }} + + # - uses: actions/checkout@v4 + + # - name: Install test dependencies + # run: pip install pytest pytest-rerunfailures hypothesis psutil pyarrow + + # - name: Run tests + # shell: bash + # run: | + # PROJECT_CWD=$PWD + # rm tiledb/__init__.py + # cd .. + # pytest -vv --showlocals $PROJECT_CWD + + # - name: "Re-run tests without pandas" + # run: | + # pip uninstall -y pandas + # pytest -vv --showlocals $PROJECT_CWD upload_pypi: needs: [build_wheels, test_sdist] From c84f1fc54d2685b2da1ec37918b74f081a1f8d8e Mon Sep 17 00:00:00 2001 From: Konstantinos Tsitsimpikos Date: Fri, 5 Sep 2025 12:57:26 -0400 Subject: [PATCH 06/20] Remove instead of commenting out --- .github/workflows/build-wheels.yml | 47 ------------------------------ 1 file changed, 47 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 63a3f9894f..e03b2da55d 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -33,7 +33,6 @@ jobs: - [ubuntu-24.04-arm, manylinux_aarch64] - [macos-13, macosx_x86_64] - [macos-14, macosx_arm64] - # - [windows-2022, win_amd64] python: ["cp39", "cp310", "cp311", "cp312", "cp313"] steps: @@ -95,52 +94,6 @@ jobs: name: sdist path: dist/*.tar.gz - # test_sdist: - # name: Test source distribution package - # needs: [build_sdist] - # strategy: - # matrix: - # os: - # - macos-13 - # - macos-14 - # - windows-2022 - # - ubuntu-22.04 - # - ubuntu-24.04-arm - # python: ["3.9", "3.10", "3.11", "3.12", "3.13"] - # runs-on: ${{ matrix.os }} - # steps: - # - name: Set up Python ${{ matrix.python }} - # uses: actions/setup-python@v5 - # with: - # python-version: ${{ matrix.python }} - - # - name: Download sdist artifact - # uses: actions/download-artifact@v4 - # with: - # name: sdist - # path: dist - - # - name: Install sdist artifact - # run: pip install --verbose dist/${{ needs.build_sdist.outputs.sdist_name }} - - # - uses: actions/checkout@v4 - - # - name: Install test dependencies - # run: pip install pytest pytest-rerunfailures hypothesis psutil pyarrow - - # - name: Run tests - # shell: bash - # run: | - # PROJECT_CWD=$PWD - # rm tiledb/__init__.py - # cd .. - # pytest -vv --showlocals $PROJECT_CWD - - # - name: "Re-run tests without pandas" - # run: | - # pip uninstall -y pandas - # pytest -vv --showlocals $PROJECT_CWD - upload_pypi: needs: [build_wheels, test_sdist] runs-on: ubuntu-latest From 6e3df4cecfdb2dbc68e0ccd09c4fb3594b3913c8 Mon Sep 17 00:00:00 2001 From: Konstantinos Tsitsimpikos Date: Fri, 5 Sep 2025 12:58:17 -0400 Subject: [PATCH 07/20] Remove dependency for upload --- .github/workflows/build-wheels.yml | 48 +++++++++++++++--------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index e03b2da55d..fe27ae8606 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -94,30 +94,30 @@ jobs: name: sdist path: dist/*.tar.gz - upload_pypi: - needs: [build_wheels, test_sdist] - runs-on: ubuntu-latest - environment: pypi - permissions: - id-token: write - outputs: - package_version: ${{ steps.get_package_version.outputs.package_version }} - steps: - - uses: actions/download-artifact@v4 - with: - path: dist - merge-multiple: true + # upload_pypi: + # needs: [build_wheels, test_sdist] + # runs-on: ubuntu-latest + # environment: pypi + # permissions: + # id-token: write + # outputs: + # package_version: ${{ steps.get_package_version.outputs.package_version }} + # steps: + # - uses: actions/download-artifact@v4 + # with: + # path: dist + # merge-multiple: true - - id: get_package_version - run: | - echo "package_version=$(ls dist/ | head -n 1 | cut -d - -f 2)" >> "$GITHUB_OUTPUT" + # - id: get_package_version + # run: | + # echo "package_version=$(ls dist/ | head -n 1 | cut -d - -f 2)" >> "$GITHUB_OUTPUT" - - name: Upload to test-pypi - if: inputs.test_pypi - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ + # - name: Upload to test-pypi + # if: inputs.test_pypi + # uses: pypa/gh-action-pypi-publish@release/v1 + # with: + # repository-url: https://test.pypi.org/legacy/ - - name: Upload to pypi - if: startsWith(github.ref, 'refs/tags/') - uses: pypa/gh-action-pypi-publish@release/v1 + # - name: Upload to pypi + # if: startsWith(github.ref, 'refs/tags/') + # uses: pypa/gh-action-pypi-publish@release/v1 From b709f37460778c56119d844a2bf0ca19062f5cd2 Mon Sep 17 00:00:00 2001 From: Konstantinos Tsitsimpikos Date: Fri, 5 Sep 2025 13:25:39 -0400 Subject: [PATCH 08/20] Enable windows build --- .github/workflows/build-wheels.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index fe27ae8606..d35f05d04d 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -33,6 +33,7 @@ jobs: - [ubuntu-24.04-arm, manylinux_aarch64] - [macos-13, macosx_x86_64] - [macos-14, macosx_arm64] + - [windows-2022, win_amd64] python: ["cp39", "cp310", "cp311", "cp312", "cp313"] steps: @@ -62,6 +63,8 @@ jobs: CIBW_MANYLINUX_AARCH64_IMAGE: "manylinux_2_28" CIBW_REPAIR_WHEEL_COMMAND_LINUX: "bash -c 'if [ -n \"$RUNNER_TEMP\" ] && [ -d \"$RUNNER_TEMP/tiledb-external\" ]; then export LD_LIBRARY_PATH=\"$RUNNER_TEMP/tiledb-external:$LD_LIBRARY_PATH\"; fi; auditwheel repair -w {dest_dir} {wheel}'" CIBW_REPAIR_WHEEL_COMMAND_MACOS: "bash -c 'if [ -n \"$RUNNER_TEMP\" ] && [ -d \"$RUNNER_TEMP/tiledb-external\" ]; then export DYLD_LIBRARY_PATH=\"$RUNNER_TEMP/tiledb-external:$DYLD_LIBRARY_PATH\"; fi; delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}'" + CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel" + CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path \"%RUNNER_TEMP%\\tiledb-external\" -w {dest_dir} {wheel}" # __init__.py interferes with the tests and is included as local file instead of # used from wheels. To be honest, tests should not be in the source folder at all. CIBW_BEFORE_TEST: rm {project}/tiledb/__init__.py @@ -94,6 +97,8 @@ jobs: name: sdist path: dist/*.tar.gz + + # upload_pypi: # needs: [build_wheels, test_sdist] # runs-on: ubuntu-latest From d96ef76526d196085bd9f285b92dcab573743f01 Mon Sep 17 00:00:00 2001 From: Konstantinos Tsitsimpikos Date: Mon, 8 Sep 2025 12:03:47 -0400 Subject: [PATCH 09/20] Adding rpath support for macos --- tiledb/CMakeLists.txt | 25 ++++++++++++++++++++++++- tiledb/libtiledb/CMakeLists.txt | 15 ++++++++++++++- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/tiledb/CMakeLists.txt b/tiledb/CMakeLists.txt index 7141361b64..45b032f43b 100644 --- a/tiledb/CMakeLists.txt +++ b/tiledb/CMakeLists.txt @@ -1,5 +1,10 @@ # Pybind11 +# Enable @rpath support on macOS for proper library isolation +if(APPLE) + set(CMAKE_MACOSX_RPATH ON) +endif() + pybind11_add_module( main main.cc @@ -50,13 +55,31 @@ if(TILEDB_DOWNLOADED) install(IMPORTED_RUNTIME_ARTIFACTS TileDB::tiledb_shared DESTINATION "${TILEDB_EXTERNAL_DIR}") + + # Set RPATH to use @rpath for proper library isolation on macOS + if(APPLE) + set_target_properties(main PROPERTIES + INSTALL_RPATH "@rpath" + BUILD_WITH_INSTALL_RPATH TRUE + ) + else() + set_target_properties(main PROPERTIES INSTALL_RPATH "${TILEDB_EXTERNAL_DIR}") + endif() else() # If using external TileDB core library force it to be linked at runtime using RPATH get_property(TILEDB_LOCATION TARGET TileDB::tiledb_shared PROPERTY LOCATION) get_filename_component(TILEDB_LOCATION ${TILEDB_LOCATION} DIRECTORY) message(STATUS "Setting RPATH for targets \"main\" and \"libtiledb\" to ${TILEDB_LOCATION}") - set_target_properties(main PROPERTIES INSTALL_RPATH ${TILEDB_LOCATION}) + + if(APPLE) + set_target_properties(main PROPERTIES + INSTALL_RPATH "@rpath" + BUILD_WITH_INSTALL_RPATH TRUE + ) + else() + set_target_properties(main PROPERTIES INSTALL_RPATH ${TILEDB_LOCATION}) + endif() endif() add_subdirectory(libtiledb) \ No newline at end of file diff --git a/tiledb/libtiledb/CMakeLists.txt b/tiledb/libtiledb/CMakeLists.txt index cc3a0ecbe9..23856e93b2 100644 --- a/tiledb/libtiledb/CMakeLists.txt +++ b/tiledb/libtiledb/CMakeLists.txt @@ -1,3 +1,8 @@ +# Enable @rpath support on macOS for proper library isolation +if(APPLE) + set(CMAKE_MACOSX_RPATH ON) +endif() + pybind11_add_module( libtiledb array.cc @@ -59,5 +64,13 @@ if(NOT TILEDB_DOWNLOADED) get_property(TILEDB_LOCATION TARGET TileDB::tiledb_shared PROPERTY LOCATION) get_filename_component(TILEDB_LOCATION ${TILEDB_LOCATION} DIRECTORY) message(STATUS "Setting RPATH for target \"libtiledb\" to ${TILEDB_LOCATION}") - set_target_properties(libtiledb PROPERTIES INSTALL_RPATH ${TILEDB_LOCATION}) + + if(APPLE) + set_target_properties(libtiledb PROPERTIES + INSTALL_RPATH "@rpath" + BUILD_WITH_INSTALL_RPATH TRUE + ) + else() + set_target_properties(libtiledb PROPERTIES INSTALL_RPATH ${TILEDB_LOCATION}) + endif() endif() From f36635ec0bf895afdb02e03b2a26bd79c2a98cf4 Mon Sep 17 00:00:00 2001 From: Konstantinos Tsitsimpikos Date: Tue, 9 Sep 2025 10:00:56 -0400 Subject: [PATCH 10/20] sdist provision --- tiledb/CMakeLists.txt | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/tiledb/CMakeLists.txt b/tiledb/CMakeLists.txt index 45b032f43b..3273d13bb5 100644 --- a/tiledb/CMakeLists.txt +++ b/tiledb/CMakeLists.txt @@ -46,26 +46,33 @@ install(TARGETS main DESTINATION tiledb) if(TILEDB_DOWNLOADED) if(DEFINED ENV{RUNNER_TEMP}) + # For CI builds set(TILEDB_EXTERNAL_DIR "$ENV{RUNNER_TEMP}/tiledb-external") + message(STATUS "Installing TileDB to: ${TILEDB_EXTERNAL_DIR}") + install(IMPORTED_RUNTIME_ARTIFACTS TileDB::tiledb_shared + DESTINATION "${TILEDB_EXTERNAL_DIR}") + + # Set RPATH to use @rpath for proper library isolation on macOS + if(APPLE) + set_target_properties(main PROPERTIES + INSTALL_RPATH "@rpath" + BUILD_WITH_INSTALL_RPATH TRUE + ) + else() + set_target_properties(main PROPERTIES INSTALL_RPATH "${TILEDB_EXTERNAL_DIR}") + endif() else() - set(TILEDB_EXTERNAL_DIR "${CMAKE_BINARY_DIR}/_external/tiledb") - endif() - - message(STATUS "Installing TileDB to: ${TILEDB_EXTERNAL_DIR}") - - install(IMPORTED_RUNTIME_ARTIFACTS TileDB::tiledb_shared - DESTINATION "${TILEDB_EXTERNAL_DIR}") - - # Set RPATH to use @rpath for proper library isolation on macOS - if(APPLE) - set_target_properties(main PROPERTIES - INSTALL_RPATH "@rpath" - BUILD_WITH_INSTALL_RPATH TRUE - ) - else() - set_target_properties(main PROPERTIES INSTALL_RPATH "${TILEDB_EXTERNAL_DIR}") + # For local builds - auditwheel is not present + install(IMPORTED_RUNTIME_ARTIFACTS TileDB::tiledb_shared DESTINATION tiledb) + + if (APPLE) + set_target_properties(main PROPERTIES INSTALL_RPATH "@loader_path") + elseif(UNIX) + set_target_properties(main PROPERTIES INSTALL_RPATH "\$ORIGIN") + endif() endif() + else() # If using external TileDB core library force it to be linked at runtime using RPATH get_property(TILEDB_LOCATION TARGET TileDB::tiledb_shared PROPERTY LOCATION) From d988169029283e9c3b969548956c5a489eb22bca Mon Sep 17 00:00:00 2001 From: Konstantinos Tsitsimpikos Date: Tue, 9 Sep 2025 10:07:18 -0400 Subject: [PATCH 11/20] Re-instantiate test_sdist step --- .github/workflows/build-wheels.yml | 98 ++++++++++++++++++++++-------- 1 file changed, 71 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index d35f05d04d..a0a952a803 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -97,32 +97,76 @@ jobs: name: sdist path: dist/*.tar.gz + test_sdist: + name: Test source distribution package + needs: [build_sdist] + strategy: + matrix: + os: + - macos-13 + - macos-14 + - windows-2022 + - ubuntu-22.04 + - ubuntu-24.04-arm + python: ["3.9", "3.10", "3.11", "3.12", "3.13"] + runs-on: ${{ matrix.os }} + steps: + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + + - name: Download sdist artifact + uses: actions/download-artifact@v4 + with: + name: sdist + path: dist + + - name: Install sdist artifact + run: pip install --verbose dist/${{ needs.build_sdist.outputs.sdist_name }} + + - uses: actions/checkout@v4 + + - name: Install test dependencies + run: pip install pytest pytest-rerunfailures hypothesis psutil pyarrow + + - name: Run tests + shell: bash + run: | + PROJECT_CWD=$PWD + rm tiledb/__init__.py + cd .. + pytest -vv --showlocals $PROJECT_CWD + + - name: "Re-run tests without pandas" + run: | + pip uninstall -y pandas + pytest -vv --showlocals $PROJECT_CWD + + upload_pypi: + needs: [build_wheels, test_sdist] + runs-on: ubuntu-latest + environment: pypi + permissions: + id-token: write + outputs: + package_version: ${{ steps.get_package_version.outputs.package_version }} + steps: + - uses: actions/download-artifact@v4 + with: + path: dist + merge-multiple: true + - id: get_package_version + run: | + echo "package_version=$(ls dist/ | head -n 1 | cut -d - -f 2)" >> "$GITHUB_OUTPUT" + + - name: Upload to test-pypi + if: inputs.test_pypi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ - # upload_pypi: - # needs: [build_wheels, test_sdist] - # runs-on: ubuntu-latest - # environment: pypi - # permissions: - # id-token: write - # outputs: - # package_version: ${{ steps.get_package_version.outputs.package_version }} - # steps: - # - uses: actions/download-artifact@v4 - # with: - # path: dist - # merge-multiple: true - - # - id: get_package_version - # run: | - # echo "package_version=$(ls dist/ | head -n 1 | cut -d - -f 2)" >> "$GITHUB_OUTPUT" - - # - name: Upload to test-pypi - # if: inputs.test_pypi - # uses: pypa/gh-action-pypi-publish@release/v1 - # with: - # repository-url: https://test.pypi.org/legacy/ - - # - name: Upload to pypi - # if: startsWith(github.ref, 'refs/tags/') - # uses: pypa/gh-action-pypi-publish@release/v1 + - name: Upload to pypi + if: startsWith(github.ref, 'refs/tags/') + uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file From a4b7c2545596b57c8f82f7ac85c3e8294f784532 Mon Sep 17 00:00:00 2001 From: Konstantinos Tsitsimpikos Date: Tue, 9 Sep 2025 10:49:43 -0400 Subject: [PATCH 12/20] Helper step --- .github/workflows/build-wheels.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index a0a952a803..e1d6e60d41 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -121,6 +121,13 @@ jobs: with: name: sdist path: dist + + - name: Examinate sdist artifact + shell: bash + run: | + gunzip dist/${{ needs.build_sdist.outputs.sdist_name }} + tar -xvf dist/*.tar + ls -la dist/tiledb/ - name: Install sdist artifact run: pip install --verbose dist/${{ needs.build_sdist.outputs.sdist_name }} From e54191726c632a8a25b3e0bdd8ce791a5caddaac Mon Sep 17 00:00:00 2001 From: Konstantinos Tsitsimpikos Date: Tue, 9 Sep 2025 20:01:02 -0400 Subject: [PATCH 13/20] Fixing sdist local build --- .github/workflows/build-wheels.yml | 8 +----- tiledb/CMakeLists.txt | 40 +++++++++++++++++++----------- tiledb/libtiledb/CMakeLists.txt | 30 ++++++++++++++-------- 3 files changed, 46 insertions(+), 32 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index e1d6e60d41..25e78421cd 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -122,13 +122,6 @@ jobs: name: sdist path: dist - - name: Examinate sdist artifact - shell: bash - run: | - gunzip dist/${{ needs.build_sdist.outputs.sdist_name }} - tar -xvf dist/*.tar - ls -la dist/tiledb/ - - name: Install sdist artifact run: pip install --verbose dist/${{ needs.build_sdist.outputs.sdist_name }} @@ -141,6 +134,7 @@ jobs: shell: bash run: | PROJECT_CWD=$PWD + ls -la /Users/runner/hostedtoolcache/Python/3.9.23/x64/lib/python3.9/site-packages/tiledb/ rm tiledb/__init__.py cd .. pytest -vv --showlocals $PROJECT_CWD diff --git a/tiledb/CMakeLists.txt b/tiledb/CMakeLists.txt index 3273d13bb5..4cc5252793 100644 --- a/tiledb/CMakeLists.txt +++ b/tiledb/CMakeLists.txt @@ -43,41 +43,50 @@ endif() install(TARGETS main DESTINATION tiledb) +# Handle TileDB shared library installation and RPATH setup if(TILEDB_DOWNLOADED) - if(DEFINED ENV{RUNNER_TEMP}) - # For CI builds + # For CI builds - install to external directory set(TILEDB_EXTERNAL_DIR "$ENV{RUNNER_TEMP}/tiledb-external") - message(STATUS "Installing TileDB to: ${TILEDB_EXTERNAL_DIR}") + message(STATUS "CI Build - installing TileDB to: ${TILEDB_EXTERNAL_DIR}") install(IMPORTED_RUNTIME_ARTIFACTS TileDB::tiledb_shared DESTINATION "${TILEDB_EXTERNAL_DIR}") - # Set RPATH to use @rpath for proper library isolation on macOS + # Set RPATH for CI builds if(APPLE) set_target_properties(main PROPERTIES INSTALL_RPATH "@rpath" BUILD_WITH_INSTALL_RPATH TRUE ) else() - set_target_properties(main PROPERTIES INSTALL_RPATH "${TILEDB_EXTERNAL_DIR}") + set_target_properties(main PROPERTIES + INSTALL_RPATH "${TILEDB_EXTERNAL_DIR}" + BUILD_WITH_INSTALL_RPATH TRUE + ) endif() else() - # For local builds - auditwheel is not present + # For local builds - install to tiledb directory + message(STATUS "Local Build - installing TileDB shared library to tiledb directory") install(IMPORTED_RUNTIME_ARTIFACTS TileDB::tiledb_shared DESTINATION tiledb) - if (APPLE) - set_target_properties(main PROPERTIES INSTALL_RPATH "@loader_path") + # Set RPATH for local builds + if(APPLE) + set_target_properties(main PROPERTIES + INSTALL_RPATH "@loader_path" + BUILD_WITH_INSTALL_RPATH TRUE + ) elseif(UNIX) - set_target_properties(main PROPERTIES INSTALL_RPATH "\$ORIGIN") + set_target_properties(main PROPERTIES + INSTALL_RPATH "\$ORIGIN" + BUILD_WITH_INSTALL_RPATH TRUE + ) endif() endif() - - else() - # If using external TileDB core library force it to be linked at runtime using RPATH + # For external TileDB installations - no installation needed, just set RPATH get_property(TILEDB_LOCATION TARGET TileDB::tiledb_shared PROPERTY LOCATION) get_filename_component(TILEDB_LOCATION ${TILEDB_LOCATION} DIRECTORY) - message(STATUS "Setting RPATH for targets \"main\" and \"libtiledb\" to ${TILEDB_LOCATION}") + message(STATUS "External TileDB - setting RPATH to: ${TILEDB_LOCATION}") if(APPLE) set_target_properties(main PROPERTIES @@ -85,7 +94,10 @@ else() BUILD_WITH_INSTALL_RPATH TRUE ) else() - set_target_properties(main PROPERTIES INSTALL_RPATH ${TILEDB_LOCATION}) + set_target_properties(main PROPERTIES + INSTALL_RPATH ${TILEDB_LOCATION} + BUILD_WITH_INSTALL_RPATH TRUE + ) endif() endif() diff --git a/tiledb/libtiledb/CMakeLists.txt b/tiledb/libtiledb/CMakeLists.txt index 23856e93b2..5b686534ab 100644 --- a/tiledb/libtiledb/CMakeLists.txt +++ b/tiledb/libtiledb/CMakeLists.txt @@ -59,18 +59,26 @@ endif() install(TARGETS libtiledb DESTINATION tiledb) -if(NOT TILEDB_DOWNLOADED) - # If using external TileDB core library force it to be linked at runtime using RPATH +# Set RPATH for proper library resolution at runtime +if(APPLE) + message(STATUS "Setting RPATH for target \"libtiledb\" to @loader_path") + set_target_properties(libtiledb PROPERTIES + INSTALL_RPATH "@loader_path" + BUILD_WITH_INSTALL_RPATH TRUE + ) +elseif(UNIX) + message(STATUS "Setting RPATH for target \"libtiledb\" to \$ORIGIN") + set_target_properties(libtiledb PROPERTIES + INSTALL_RPATH "\$ORIGIN" + BUILD_WITH_INSTALL_RPATH TRUE + ) +else() + # For Windows or other platforms, use absolute path get_property(TILEDB_LOCATION TARGET TileDB::tiledb_shared PROPERTY LOCATION) get_filename_component(TILEDB_LOCATION ${TILEDB_LOCATION} DIRECTORY) message(STATUS "Setting RPATH for target \"libtiledb\" to ${TILEDB_LOCATION}") - - if(APPLE) - set_target_properties(libtiledb PROPERTIES - INSTALL_RPATH "@rpath" - BUILD_WITH_INSTALL_RPATH TRUE - ) - else() - set_target_properties(libtiledb PROPERTIES INSTALL_RPATH ${TILEDB_LOCATION}) - endif() + set_target_properties(libtiledb PROPERTIES + INSTALL_RPATH ${TILEDB_LOCATION} + BUILD_WITH_INSTALL_RPATH TRUE + ) endif() From 0138dab41260ab0d29125b3334488cdd9fe51c64 Mon Sep 17 00:00:00 2001 From: Konstantinos Tsitsimpikos Date: Tue, 9 Sep 2025 20:58:04 -0400 Subject: [PATCH 14/20] Reseting RUNNER_TEMP in build_sdist --- .github/workflows/build-wheels.yml | 5 +++- tiledb/CMakeLists.txt | 2 +- tiledb/libtiledb/CMakeLists.txt | 43 ++++++++++++++++++++---------- 3 files changed, 34 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 25e78421cd..086e13af45 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -79,6 +79,8 @@ jobs: build_sdist: name: Build source distribution runs-on: ubuntu-latest + env: + RUNNER_TEMP: "" outputs: sdist_name: ${{ steps.get_sdist_name.outputs.sdist_name }} steps: @@ -110,6 +112,8 @@ jobs: - ubuntu-24.04-arm python: ["3.9", "3.10", "3.11", "3.12", "3.13"] runs-on: ${{ matrix.os }} + env: + RUNNER_TEMP: "" steps: - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v5 @@ -134,7 +138,6 @@ jobs: shell: bash run: | PROJECT_CWD=$PWD - ls -la /Users/runner/hostedtoolcache/Python/3.9.23/x64/lib/python3.9/site-packages/tiledb/ rm tiledb/__init__.py cd .. pytest -vv --showlocals $PROJECT_CWD diff --git a/tiledb/CMakeLists.txt b/tiledb/CMakeLists.txt index 4cc5252793..7e236b8374 100644 --- a/tiledb/CMakeLists.txt +++ b/tiledb/CMakeLists.txt @@ -45,7 +45,7 @@ install(TARGETS main DESTINATION tiledb) # Handle TileDB shared library installation and RPATH setup if(TILEDB_DOWNLOADED) - if(DEFINED ENV{RUNNER_TEMP}) + if(ENV{RUNNER_TEMP}) # For CI builds - install to external directory set(TILEDB_EXTERNAL_DIR "$ENV{RUNNER_TEMP}/tiledb-external") message(STATUS "CI Build - installing TileDB to: ${TILEDB_EXTERNAL_DIR}") diff --git a/tiledb/libtiledb/CMakeLists.txt b/tiledb/libtiledb/CMakeLists.txt index 5b686534ab..fa1610bdb5 100644 --- a/tiledb/libtiledb/CMakeLists.txt +++ b/tiledb/libtiledb/CMakeLists.txt @@ -59,21 +59,36 @@ endif() install(TARGETS libtiledb DESTINATION tiledb) -# Set RPATH for proper library resolution at runtime -if(APPLE) - message(STATUS "Setting RPATH for target \"libtiledb\" to @loader_path") - set_target_properties(libtiledb PROPERTIES - INSTALL_RPATH "@loader_path" - BUILD_WITH_INSTALL_RPATH TRUE - ) -elseif(UNIX) - message(STATUS "Setting RPATH for target \"libtiledb\" to \$ORIGIN") - set_target_properties(libtiledb PROPERTIES - INSTALL_RPATH "\$ORIGIN" - BUILD_WITH_INSTALL_RPATH TRUE - ) +if(TILEDB_DOWNLOADED) + if(ENV{RUNNER_TEMP}) + # CI builds - shared library is in external directory + set(TILEDB_EXTERNAL_DIR "$ENV{RUNNER_TEMP}/tiledb-external") + if(APPLE) + set_target_properties(libtiledb PROPERTIES + INSTALL_RPATH "@rpath" + BUILD_WITH_INSTALL_RPATH TRUE + ) + else() + set_target_properties(libtiledb PROPERTIES + INSTALL_RPATH "${TILEDB_EXTERNAL_DIR}" + BUILD_WITH_INSTALL_RPATH TRUE + ) + endif() + else() + # Local builds - shared library is in same directory + if(APPLE) + set_target_properties(libtiledb PROPERTIES + INSTALL_RPATH "@loader_path" + BUILD_WITH_INSTALL_RPATH TRUE + ) + elseif(UNIX) + set_target_properties(libtiledb PROPERTIES + INSTALL_RPATH "\$ORIGIN" + BUILD_WITH_INSTALL_RPATH TRUE + ) + endif() + endif() else() - # For Windows or other platforms, use absolute path get_property(TILEDB_LOCATION TARGET TileDB::tiledb_shared PROPERTY LOCATION) get_filename_component(TILEDB_LOCATION ${TILEDB_LOCATION} DIRECTORY) message(STATUS "Setting RPATH for target \"libtiledb\" to ${TILEDB_LOCATION}") From 835775c27867763e7860ee2170002de657a10782 Mon Sep 17 00:00:00 2001 From: Konstantinos Tsitsimpikos Date: Tue, 9 Sep 2025 23:24:13 -0400 Subject: [PATCH 15/20] Change env variable name for local-ci build condition --- .github/workflows/build-wheels.yml | 3 +++ tiledb/CMakeLists.txt | 2 +- tiledb/libtiledb/CMakeLists.txt | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 086e13af45..73386326d0 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -49,6 +49,7 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.23.3 env: + CI_WHEEL_BUILD: true CIBW_BUILD_VERBOSITY: 3 CIBW_ENVIRONMENT_PASS_LINUX: SETUPTOOLS_SCM_PRETEND_VERSION_FOR_TILEDB S3_BUCKET TILEDB_TOKEN TILEDB_NAMESPACE RUNNER_TEMP CIBW_ENVIRONMENT_MACOS: > @@ -81,6 +82,7 @@ jobs: runs-on: ubuntu-latest env: RUNNER_TEMP: "" + CI_WHEEL_BUILD: false outputs: sdist_name: ${{ steps.get_sdist_name.outputs.sdist_name }} steps: @@ -113,6 +115,7 @@ jobs: python: ["3.9", "3.10", "3.11", "3.12", "3.13"] runs-on: ${{ matrix.os }} env: + CI_WHEEL_BUILD: false RUNNER_TEMP: "" steps: - name: Set up Python ${{ matrix.python }} diff --git a/tiledb/CMakeLists.txt b/tiledb/CMakeLists.txt index 7e236b8374..0d11ce9ee9 100644 --- a/tiledb/CMakeLists.txt +++ b/tiledb/CMakeLists.txt @@ -45,7 +45,7 @@ install(TARGETS main DESTINATION tiledb) # Handle TileDB shared library installation and RPATH setup if(TILEDB_DOWNLOADED) - if(ENV{RUNNER_TEMP}) + if(ENV{CI_WHEEL_BUILD}) # For CI builds - install to external directory set(TILEDB_EXTERNAL_DIR "$ENV{RUNNER_TEMP}/tiledb-external") message(STATUS "CI Build - installing TileDB to: ${TILEDB_EXTERNAL_DIR}") diff --git a/tiledb/libtiledb/CMakeLists.txt b/tiledb/libtiledb/CMakeLists.txt index fa1610bdb5..7b10f93fc0 100644 --- a/tiledb/libtiledb/CMakeLists.txt +++ b/tiledb/libtiledb/CMakeLists.txt @@ -60,7 +60,7 @@ endif() install(TARGETS libtiledb DESTINATION tiledb) if(TILEDB_DOWNLOADED) - if(ENV{RUNNER_TEMP}) + if(ENV{CI_WHEEL_BUILD}) # CI builds - shared library is in external directory set(TILEDB_EXTERNAL_DIR "$ENV{RUNNER_TEMP}/tiledb-external") if(APPLE) From 6bcc5131b68ad69608dc195140b6f00f872bc4fb Mon Sep 17 00:00:00 2001 From: Konstantinos Tsitsimpikos Date: Tue, 9 Sep 2025 23:40:06 -0400 Subject: [PATCH 16/20] Test without windows --- .github/workflows/build-wheels.yml | 5 +++-- tiledb/CMakeLists.txt | 3 ++- tiledb/libtiledb/CMakeLists.txt | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 73386326d0..8ba47f9e59 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -33,7 +33,7 @@ jobs: - [ubuntu-24.04-arm, manylinux_aarch64] - [macos-13, macosx_x86_64] - [macos-14, macosx_arm64] - - [windows-2022, win_amd64] + # - [windows-2022, win_amd64] python: ["cp39", "cp310", "cp311", "cp312", "cp313"] steps: @@ -49,7 +49,8 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.23.3 env: - CI_WHEEL_BUILD: true + CIBW_ENVIRONMENT: + CI_WHEEL_BUILD=true CIBW_BUILD_VERBOSITY: 3 CIBW_ENVIRONMENT_PASS_LINUX: SETUPTOOLS_SCM_PRETEND_VERSION_FOR_TILEDB S3_BUCKET TILEDB_TOKEN TILEDB_NAMESPACE RUNNER_TEMP CIBW_ENVIRONMENT_MACOS: > diff --git a/tiledb/CMakeLists.txt b/tiledb/CMakeLists.txt index 0d11ce9ee9..7b735fc384 100644 --- a/tiledb/CMakeLists.txt +++ b/tiledb/CMakeLists.txt @@ -45,7 +45,8 @@ install(TARGETS main DESTINATION tiledb) # Handle TileDB shared library installation and RPATH setup if(TILEDB_DOWNLOADED) - if(ENV{CI_WHEEL_BUILD}) + message(STATUS "CI_WHEEL_BUILD is set to: '$ENV{CI_WHEEL_BUILD}'") + if(ENV{CI_WHEEL_BUILD} STREQUAL "true") # For CI builds - install to external directory set(TILEDB_EXTERNAL_DIR "$ENV{RUNNER_TEMP}/tiledb-external") message(STATUS "CI Build - installing TileDB to: ${TILEDB_EXTERNAL_DIR}") diff --git a/tiledb/libtiledb/CMakeLists.txt b/tiledb/libtiledb/CMakeLists.txt index 7b10f93fc0..fdadb39d54 100644 --- a/tiledb/libtiledb/CMakeLists.txt +++ b/tiledb/libtiledb/CMakeLists.txt @@ -60,7 +60,7 @@ endif() install(TARGETS libtiledb DESTINATION tiledb) if(TILEDB_DOWNLOADED) - if(ENV{CI_WHEEL_BUILD}) + if(ENV{CI_WHEEL_BUILD} STREQUAL "true") # CI builds - shared library is in external directory set(TILEDB_EXTERNAL_DIR "$ENV{RUNNER_TEMP}/tiledb-external") if(APPLE) From 9ff688f323a733cbcfba910004a2fd77d92679a9 Mon Sep 17 00:00:00 2001 From: Konstantinos Tsitsimpikos Date: Wed, 10 Sep 2025 01:34:33 -0400 Subject: [PATCH 17/20] Change from STREQ to MATCH --- tiledb/CMakeLists.txt | 2 +- tiledb/libtiledb/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tiledb/CMakeLists.txt b/tiledb/CMakeLists.txt index 7b735fc384..a993b565ae 100644 --- a/tiledb/CMakeLists.txt +++ b/tiledb/CMakeLists.txt @@ -46,7 +46,7 @@ install(TARGETS main DESTINATION tiledb) # Handle TileDB shared library installation and RPATH setup if(TILEDB_DOWNLOADED) message(STATUS "CI_WHEEL_BUILD is set to: '$ENV{CI_WHEEL_BUILD}'") - if(ENV{CI_WHEEL_BUILD} STREQUAL "true") + if(ENV{CI_WHEEL_BUILD} MATCHES "true") # For CI builds - install to external directory set(TILEDB_EXTERNAL_DIR "$ENV{RUNNER_TEMP}/tiledb-external") message(STATUS "CI Build - installing TileDB to: ${TILEDB_EXTERNAL_DIR}") diff --git a/tiledb/libtiledb/CMakeLists.txt b/tiledb/libtiledb/CMakeLists.txt index fdadb39d54..e361614b8c 100644 --- a/tiledb/libtiledb/CMakeLists.txt +++ b/tiledb/libtiledb/CMakeLists.txt @@ -60,7 +60,7 @@ endif() install(TARGETS libtiledb DESTINATION tiledb) if(TILEDB_DOWNLOADED) - if(ENV{CI_WHEEL_BUILD} STREQUAL "true") + if(ENV{CI_WHEEL_BUILD} MATCHES "true") # CI builds - shared library is in external directory set(TILEDB_EXTERNAL_DIR "$ENV{RUNNER_TEMP}/tiledb-external") if(APPLE) From a16d8aea7956e9bebed99142e0077bff6cd1eb54 Mon Sep 17 00:00:00 2001 From: Konstantinos Tsitsimpikos Date: Wed, 10 Sep 2025 02:25:02 -0400 Subject: [PATCH 18/20] Change from STREQ to MATCH --- tiledb/CMakeLists.txt | 2 +- tiledb/libtiledb/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tiledb/CMakeLists.txt b/tiledb/CMakeLists.txt index a993b565ae..02eadf43a9 100644 --- a/tiledb/CMakeLists.txt +++ b/tiledb/CMakeLists.txt @@ -46,7 +46,7 @@ install(TARGETS main DESTINATION tiledb) # Handle TileDB shared library installation and RPATH setup if(TILEDB_DOWNLOADED) message(STATUS "CI_WHEEL_BUILD is set to: '$ENV{CI_WHEEL_BUILD}'") - if(ENV{CI_WHEEL_BUILD} MATCHES "true") + if(ENV{CI_WHEEL_BUILD} MATCHES "^true") # For CI builds - install to external directory set(TILEDB_EXTERNAL_DIR "$ENV{RUNNER_TEMP}/tiledb-external") message(STATUS "CI Build - installing TileDB to: ${TILEDB_EXTERNAL_DIR}") diff --git a/tiledb/libtiledb/CMakeLists.txt b/tiledb/libtiledb/CMakeLists.txt index e361614b8c..e0a67dd05f 100644 --- a/tiledb/libtiledb/CMakeLists.txt +++ b/tiledb/libtiledb/CMakeLists.txt @@ -60,7 +60,7 @@ endif() install(TARGETS libtiledb DESTINATION tiledb) if(TILEDB_DOWNLOADED) - if(ENV{CI_WHEEL_BUILD} MATCHES "true") + if(ENV{CI_WHEEL_BUILD} MATCHES "^true") # CI builds - shared library is in external directory set(TILEDB_EXTERNAL_DIR "$ENV{RUNNER_TEMP}/tiledb-external") if(APPLE) From d58686248fd1f5b719c7abca3a78cafa6624c434 Mon Sep 17 00:00:00 2001 From: Konstantinos Tsitsimpikos Date: Wed, 10 Sep 2025 09:35:43 -0400 Subject: [PATCH 19/20] Set CMAKE variable --- .github/workflows/build-wheels.yml | 6 +++--- tiledb/CMakeLists.txt | 3 ++- tiledb/libtiledb/CMakeLists.txt | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 8ba47f9e59..3139adce35 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -50,7 +50,7 @@ jobs: uses: pypa/cibuildwheel@v2.23.3 env: CIBW_ENVIRONMENT: - CI_WHEEL_BUILD=true + CI_WHEEL_BUILD=1 CIBW_BUILD_VERBOSITY: 3 CIBW_ENVIRONMENT_PASS_LINUX: SETUPTOOLS_SCM_PRETEND_VERSION_FOR_TILEDB S3_BUCKET TILEDB_TOKEN TILEDB_NAMESPACE RUNNER_TEMP CIBW_ENVIRONMENT_MACOS: > @@ -83,7 +83,7 @@ jobs: runs-on: ubuntu-latest env: RUNNER_TEMP: "" - CI_WHEEL_BUILD: false + CI_WHEEL_BUILD: 0 outputs: sdist_name: ${{ steps.get_sdist_name.outputs.sdist_name }} steps: @@ -116,7 +116,7 @@ jobs: python: ["3.9", "3.10", "3.11", "3.12", "3.13"] runs-on: ${{ matrix.os }} env: - CI_WHEEL_BUILD: false + CI_WHEEL_BUILD: 0 RUNNER_TEMP: "" steps: - name: Set up Python ${{ matrix.python }} diff --git a/tiledb/CMakeLists.txt b/tiledb/CMakeLists.txt index 02eadf43a9..a73a7e649b 100644 --- a/tiledb/CMakeLists.txt +++ b/tiledb/CMakeLists.txt @@ -46,7 +46,8 @@ install(TARGETS main DESTINATION tiledb) # Handle TileDB shared library installation and RPATH setup if(TILEDB_DOWNLOADED) message(STATUS "CI_WHEEL_BUILD is set to: '$ENV{CI_WHEEL_BUILD}'") - if(ENV{CI_WHEEL_BUILD} MATCHES "^true") + set(CI_BUILD_VAR "$ENV{CI_WHEEL_BUILD}") + if(CI_BUILD_VAR OR CIBUILD_VAR STREQUAL "1") # For CI builds - install to external directory set(TILEDB_EXTERNAL_DIR "$ENV{RUNNER_TEMP}/tiledb-external") message(STATUS "CI Build - installing TileDB to: ${TILEDB_EXTERNAL_DIR}") diff --git a/tiledb/libtiledb/CMakeLists.txt b/tiledb/libtiledb/CMakeLists.txt index e0a67dd05f..d5f30f894b 100644 --- a/tiledb/libtiledb/CMakeLists.txt +++ b/tiledb/libtiledb/CMakeLists.txt @@ -60,7 +60,8 @@ endif() install(TARGETS libtiledb DESTINATION tiledb) if(TILEDB_DOWNLOADED) - if(ENV{CI_WHEEL_BUILD} MATCHES "^true") + set(CI_BUILD_VAR "$ENV{CI_WHEEL_BUILD}") + if(CI_BUILD_VAR OR CIBUILD_VAR STREQUAL "1") # CI builds - shared library is in external directory set(TILEDB_EXTERNAL_DIR "$ENV{RUNNER_TEMP}/tiledb-external") if(APPLE) From fa5816396a6e599fd715408769a3e50e93ca2811 Mon Sep 17 00:00:00 2001 From: Konstantinos Tsitsimpikos Date: Wed, 10 Sep 2025 10:17:06 -0400 Subject: [PATCH 20/20] Enable windows build --- .github/workflows/build-wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 3139adce35..73d2b7fce5 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -33,7 +33,7 @@ jobs: - [ubuntu-24.04-arm, manylinux_aarch64] - [macos-13, macosx_x86_64] - [macos-14, macosx_arm64] - # - [windows-2022, win_amd64] + - [windows-2022, win_amd64] python: ["cp39", "cp310", "cp311", "cp312", "cp313"] steps: