Skip to content

Commit a4d986b

Browse files
author
Vasu Jaganath
committed
cleanup comments
1 parent 1b4a636 commit a4d986b

File tree

4 files changed

+64
-102
lines changed

4 files changed

+64
-102
lines changed

.github/workflows/publish_pypi.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,12 @@ jobs:
7070
cp -r local_install /tmp/bfiocpp_bld
7171
CIBW_BEFORE_ALL_WINDOWS: ci-utils\install_prereq_win.bat &&
7272
xcopy /E /I /y local_install C:\TEMP\bfiocpp_bld\local_install
73-
CIBW_ENVIRONMENT_MACOS: REPAIR_LIBRARY_PATH="/tmp/bfiocpp_bld/local_install/lib:/tmp/bfiocpp_bld/local_install/lib64" ON_GITHUB="TRUE" BFIOCPP_DEP_DIR="/tmp/bfiocpp_bld/local_install"
73+
CIBW_ENVIRONMENT_MACOS: >-
74+
MACOSX_DEPLOYMENT_TARGET=11.0
75+
REPAIR_LIBRARY_PATH="/tmp/bfiocpp_bld/local_install/lib:/tmp/bfiocpp_bld/local_install/lib64"
76+
ON_GITHUB="TRUE"
77+
BFIOCPP_DEP_DIR="/tmp/bfiocpp_bld/local_install"
78+
CMAKE_ARGS="-DCMAKE_CXX_FLAGS=-Wno-missing-template-arg-list-after-template-kw -DTENSORSTORE_USE_SYSTEM_JPEG=ON -DTENSORSTORE_USE_SYSTEM_ZLIB=ON -DTENSORSTORE_USE_SYSTEM_PNG=ON"
7479
CIBW_ENVIRONMENT_LINUX: LD_LIBRARY_PATH="/tmp/bfiocpp_bld/local_install/lib:/tmp/bfiocpp_bld/local_install/lib64:$LD_LIBRARY_PATH" ON_GITHUB="TRUE" BFIOCPP_DEP_DIR="/tmp/bfiocpp_bld/local_install"
7580
CIBW_REPAIR_WHEEL_COMMAND_MACOS: DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-listdeps {wheel} && DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
7681
CIBW_ENVIRONMENT_WINDOWS: PATH="$TEMP\\bfiocpp\\bin;$PATH" ON_GITHUB="TRUE" BFIOCPP_DEP_DIR="C:\\TEMP\\bfiocpp_bld\\local_install" CMAKE_ARGS="-DCMAKE_GENERATOR=Ninja"

.github/workflows/wheel_build.yml

Lines changed: 58 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ jobs:
1717
MACOSX_DEPLOYMENT_TARGET: "10.15"
1818
strategy:
1919
matrix:
20-
#os: [ubuntu-22.04, macos-15-intel, windows-latest]
21-
os: [macos-15-intel]
20+
os: [ubuntu-22.04, macos-15-intel, windows-latest]
2221
cibw_archs: ["auto64"]
23-
# cibw_build: ["cp310", "cp311", "cp312", "cp313"]
24-
cibw_build: ["cp310"]
22+
cibw_build: ["cp310", "cp311", "cp312", "cp313"]
2523

2624
steps:
2725
- uses: actions/checkout@v3
@@ -76,7 +74,7 @@ jobs:
7674
REPAIR_LIBRARY_PATH="/tmp/bfiocpp_bld/local_install/lib:/tmp/bfiocpp_bld/local_install/lib64"
7775
ON_GITHUB="TRUE"
7876
BFIOCPP_DEP_DIR="/tmp/bfiocpp_bld/local_install"
79-
CMAKE_ARGS="-DCMAKE_CXX_FLAGS=-Wno-missing-template-arg-list-after-template-kw -DTENSORSTORE_USE_SYSTEM_JPEG=ON -DTENSORSTORE_USE_SYSTEM_ZLIB=ON -DTENSORSTORE_USE_SYSTEM_GRPC=ON -DTENSORSTORE_USE_SYSTEM_PNG=ON"
77+
CMAKE_ARGS="-DCMAKE_CXX_FLAGS=-Wno-missing-template-arg-list-after-template-kw -DTENSORSTORE_USE_SYSTEM_JPEG=ON -DTENSORSTORE_USE_SYSTEM_ZLIB=ON -DTENSORSTORE_USE_SYSTEM_PNG=ON"
8078
CIBW_ENVIRONMENT_LINUX: LD_LIBRARY_PATH="/tmp/bfiocpp_bld/local_install/lib:/tmp/bfiocpp_bld/local_install/lib64:$LD_LIBRARY_PATH" ON_GITHUB="TRUE" BFIOCPP_DEP_DIR="/tmp/bfiocpp_bld/local_install"
8179
CIBW_REPAIR_WHEEL_COMMAND_MACOS: DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-listdeps {wheel} && DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
8280
CIBW_ENVIRONMENT_WINDOWS: PATH="$TEMP\\bfiocpp\\bin;$PATH" ON_GITHUB="TRUE" BFIOCPP_DEP_DIR="C:\\TEMP\\bfiocpp_bld\\local_install" CMAKE_ARGS="-DCMAKE_GENERATOR=Ninja"
@@ -97,60 +95,60 @@ jobs:
9795
retention-days: 1
9896

9997

100-
# build_wheels_apple_arm64:
101-
# name: Build wheels on ${{ matrix.os }}
102-
# runs-on: ${{ matrix.os }}
103-
# continue-on-error: true
104-
# env:
105-
# MACOSX_DEPLOYMENT_TARGET: "11.0"
106-
# strategy:
107-
# matrix:
108-
# os: [macos-14]
109-
# cibw_archs: ["arm64"]
110-
# cibw_build: ["cp310", "cp311", "cp312", "cp313"]
111-
112-
# steps:
113-
# - uses: actions/checkout@v3
114-
# name: Check out
115-
116-
# - uses: actions/setup-python@v4
117-
# name: Install Python
118-
# with:
119-
# python-version: '3.11'
98+
build_wheels_apple_arm64:
99+
name: Build wheels on ${{ matrix.os }}
100+
runs-on: ${{ matrix.os }}
101+
continue-on-error: true
102+
env:
103+
MACOSX_DEPLOYMENT_TARGET: "11.0"
104+
strategy:
105+
matrix:
106+
os: [macos-14]
107+
cibw_archs: ["arm64"]
108+
cibw_build: ["cp310", "cp311", "cp312", "cp313"]
109+
110+
steps:
111+
- uses: actions/checkout@v3
112+
name: Check out
113+
114+
- uses: actions/setup-python@v4
115+
name: Install Python
116+
with:
117+
python-version: '3.11'
120118

121-
# - name: Install cibuildwheel
122-
# run: |
123-
# python -m pip install cibuildwheel delocate wheel
124-
125-
# - name: Building wheels
126-
# run: |
127-
# python -m cibuildwheel --output-dir dist
128-
# env:
129-
# CIBW_BUILD: ${{ matrix.cibw_build }}-*
130-
# CIBW_BUILD_VERBOSITY: 3
131-
# CIBW_ARCHS_MACOS: arm64
132-
# CIBW_BEFORE_ALL_MACOS: brew install nasm &&
133-
# brew uninstall --ignore-dependencies jpeg-turbo &&
134-
# bash ci-utils/install_prereq_linux.sh &&
135-
# mkdir -p /tmp/bfiocpp_bld &&
136-
# cp -r local_install /tmp/bfiocpp_bld
119+
- name: Install cibuildwheel
120+
run: |
121+
python -m pip install cibuildwheel delocate wheel
122+
123+
- name: Building wheels
124+
run: |
125+
python -m cibuildwheel --output-dir dist
126+
env:
127+
CIBW_BUILD: ${{ matrix.cibw_build }}-*
128+
CIBW_BUILD_VERBOSITY: 3
129+
CIBW_ARCHS_MACOS: arm64
130+
CIBW_BEFORE_ALL_MACOS: brew install nasm &&
131+
brew uninstall --ignore-dependencies jpeg-turbo &&
132+
bash ci-utils/install_prereq_linux.sh &&
133+
mkdir -p /tmp/bfiocpp_bld &&
134+
cp -r local_install /tmp/bfiocpp_bld
137135

138-
# CIBW_ENVIRONMENT_MACOS: >-
139-
# MACOSX_DEPLOYMENT_TARGET=11.0
140-
# REPAIR_LIBRARY_PATH="/tmp/bfiocpp_bld/local_install/lib:/tmp/bfiocpp_bld/local_install/lib64"
141-
# ON_GITHUB="TRUE"
142-
# BFIOCPP_DEP_DIR="/tmp/bfiocpp_bld/local_install"
143-
# CMAKE_ARGS="-DTENSORSTORE_USE_SYSTEM_JPEG=ON"
144-
# CIBW_REPAIR_WHEEL_COMMAND_MACOS: |
145-
# DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-listdeps {wheel} &&
146-
# DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
147-
# CIBW_ARCHS: ${{ matrix.cibw_archs }}
148-
# CIBW_TEST_REQUIRES: "bfio requests numpy ome_zarr zarr"
149-
# CIBW_TEST_COMMAND: python -W default -m unittest discover -s {project}/tests -v
150-
151-
# - name: Upload Artifact
152-
# uses: actions/upload-artifact@v4
153-
# with:
154-
# name: bfiocpp-wheels-${{ matrix.os }}-${{ matrix.cibw_archs }}-${{ matrix.cibw_build }}
155-
# path: dist/*.whl
156-
# retention-days: 1
136+
CIBW_ENVIRONMENT_MACOS: >-
137+
MACOSX_DEPLOYMENT_TARGET=11.0
138+
REPAIR_LIBRARY_PATH="/tmp/bfiocpp_bld/local_install/lib:/tmp/bfiocpp_bld/local_install/lib64"
139+
ON_GITHUB="TRUE"
140+
BFIOCPP_DEP_DIR="/tmp/bfiocpp_bld/local_install"
141+
CMAKE_ARGS="-DTENSORSTORE_USE_SYSTEM_JPEG=ON"
142+
CIBW_REPAIR_WHEEL_COMMAND_MACOS: |
143+
DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-listdeps {wheel} &&
144+
DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
145+
CIBW_ARCHS: ${{ matrix.cibw_archs }}
146+
CIBW_TEST_REQUIRES: "bfio requests numpy ome_zarr zarr"
147+
CIBW_TEST_COMMAND: python -W default -m unittest discover -s {project}/tests -v
148+
149+
- name: Upload Artifact
150+
uses: actions/upload-artifact@v4
151+
with:
152+
name: bfiocpp-wheels-${{ matrix.os }}-${{ matrix.cibw_archs }}-${{ matrix.cibw_build }}
153+
path: dist/*.whl
154+
retention-days: 1

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ FetchContent_Declare(
4242
)
4343

4444
# Additional FetchContent_Declare calls as needed...
45-
set(TENSORSTORE_USE_SYSTEM_GRPC ON CACHE BOOL "")
4645
FetchContent_MakeAvailable(tensorstore)
4746

4847

setup.py

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,48 +4,12 @@
44
import versioneer
55
import platform
66
import subprocess
7-
# from pathlib import Path
87

98
from distutils.version import LooseVersion
109
from setuptools import setup, find_packages, Extension
1110
from setuptools.command.build_ext import build_ext
1211

1312

14-
# def patch_grpc_basic_seq(build_temp: str) -> None:
15-
# """
16-
# Patch gRPC's basic_seq.h to drop the 'template' keyword from
17-
# Traits::template CallSeqFactory(...) which appears to upset
18-
# Apple Clang on macOS 15 / Xcode 16.
19-
# """
20-
# build_temp_path = Path(build_temp)
21-
# basic_seq_files = list(build_temp_path.rglob("basic_seq.h"))
22-
23-
# if not basic_seq_files:
24-
# print("[patch_grpc_basic_seq] No basic_seq.h found under", build_temp_path)
25-
# return
26-
27-
# pattern = "Traits::template CallSeqFactory("
28-
# replacement = "Traits::CallSeqFactory("
29-
30-
# for hdr in basic_seq_files:
31-
# try:
32-
# text = hdr.read_text()
33-
# except OSError as e:
34-
# print(f"[patch_grpc_basic_seq] Failed to read {hdr}: {e}")
35-
# continue
36-
37-
# if pattern not in text:
38-
# print(f"[patch_grpc_basic_seq] Pattern not found in {hdr}")
39-
# continue
40-
41-
# new_text = text.replace(pattern, replacement)
42-
# try:
43-
# hdr.write_text(new_text)
44-
# print(f"[patch_grpc_basic_seq] Patched CallSeqFactory in {hdr}")
45-
# except OSError as e:
46-
# print(f"[patch_grpc_basic_seq] Failed to write {hdr}: {e}")
47-
48-
4913
class CMakeExtension(Extension):
5014
def __init__(self, name, sourcedir=""):
5115
print("-----------------__init__ (" + str(Extension) + ")")
@@ -114,10 +78,6 @@ def build_extension(self, ext):
11478
["cmake", ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env
11579
)
11680

117-
# if platform.system() == "Darwin":
118-
# print("--------------- Applying gRPC basic_seq patch on macOS")
119-
# patch_grpc_basic_seq(self.build_temp)
120-
12181
if platform.system() == "Linux":
12282
rl = r"s/^#ifdef __has_builtin$/#if defined(__has_builtin)"
12383
rf = r"\&\& defined(__clang__)/"

0 commit comments

Comments
 (0)