这是indexloc提供的服务,不要输入任何密码
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
e793b11
musllinux
Sep 2, 2025
bbd72e4
check if it works
Sep 2, 2025
ff6286e
fixes
Sep 2, 2025
ea67d12
script fixes
Sep 2, 2025
4d441d6
image
Sep 2, 2025
2e589bd
fixes
Sep 2, 2025
0d30b47
upgrade
Sep 2, 2025
c47b959
Merge branch 'musllinux-image' of github.com:LeonhardFS/tuplex-public…
Sep 2, 2025
3128968
patches
Sep 2, 2025
f53f71a
refactor
Sep 2, 2025
026fb70
prefix
Sep 2, 2025
3e1cb5a
update antlr install because of cmake 4.x issues
Sep 2, 2025
9fc68d4
cleanup
Sep 2, 2025
9dd07b0
cleanup
Sep 2, 2025
485af9d
fixes
Sep 3, 2025
4e55833
fix yamlcpp install
Sep 3, 2025
56fafc4
adding zstd to the mix
Sep 3, 2025
53a1600
boost update
Sep 3, 2025
e87ee2f
boost fix
Sep 3, 2025
f7b09b8
arch fix
Sep 3, 2025
644746c
fix
Sep 3, 2025
75b1668
config
Sep 3, 2025
2d9f672
patches
Sep 3, 2025
f9fd07d
path fix
Sep 3, 2025
028e92c
patch
Sep 3, 2025
412edf4
arch fix
Sep 3, 2025
cb04e96
aarch64 fix
Sep 3, 2025
fa770b4
better 64bit aarch64 detect
Sep 3, 2025
4a60463
upgrade
Sep 3, 2025
af0896c
experiment update
Sep 3, 2025
9f273fc
Merge branch 'musllinux-image' of github.com:LeonhardFS/tuplex-public…
Sep 3, 2025
422e809
fmt update
Sep 3, 2025
2bc60bc
fmtlib EOF patch
Sep 3, 2025
0405018
Merge branch 'musllinux-image' of github.com:LeonhardFS/tuplex-public…
Sep 3, 2025
2864ea1
fmt update fix for new string view
Sep 3, 2025
ccebfff
va_arg update
Sep 3, 2025
9ae4fc8
remove boost::system lib
Sep 5, 2025
aba4a35
cleanup
Sep 5, 2025
6b24a62
fixes
Sep 5, 2025
d9a0fd4
cmake setup fixes
Sep 5, 2025
2e744d0
cmake fixes
Sep 5, 2025
fd9721d
try gh actions
Sep 5, 2025
55e0050
Fix macOS protobuf build issues
Sep 5, 2025
d1b7c35
Fix slow find command in macOS workflow verification
Sep 5, 2025
2278215
pybind11 fix
Sep 5, 2025
cb60878
fixes
Sep 5, 2025
c594007
update cibuildwheel
Sep 5, 2025
bf43f4c
force reinstall
Sep 5, 2025
1cdae24
requirements
Sep 5, 2025
475df81
test
Sep 6, 2025
5e44748
check again
Sep 6, 2025
8c23555
another test
Sep 6, 2025
b271557
update
Sep 6, 2025
d3888fb
test again
Sep 6, 2025
1fde2d8
update
Sep 6, 2025
f43a8e7
fixes
Sep 6, 2025
825c2f3
less verbose
Sep 6, 2025
212c0bd
update
Sep 6, 2025
4ebd887
fixes
Sep 6, 2025
34e2357
more concise script
Sep 6, 2025
501d527
good state
Sep 6, 2025
5cc13a6
cleanup
Sep 6, 2025
2945c53
another try
Sep 6, 2025
f0f6d13
test again...
Sep 6, 2025
f9d71e8
fix
Sep 6, 2025
55c2f59
less build
Sep 6, 2025
298b1ff
restrict
Sep 6, 2025
7c9c3d2
now test macos13
Sep 6, 2025
3532a88
test macos13
Sep 6, 2025
1624de6
suuuuudooooo
Sep 6, 2025
9ccd777
debug
Sep 6, 2025
a05aa2e
moar
Sep 6, 2025
f2262d2
intel based brew
Sep 6, 2025
1003c62
test this
Sep 6, 2025
b77d0b6
test on both macos
Sep 6, 2025
fed0550
try it out
Sep 6, 2025
653c64a
less vibe coding
Sep 6, 2025
a7c0e1a
another try
Sep 6, 2025
ba4471a
fix
Sep 6, 2025
106ff99
more verbosity to find issue
Sep 6, 2025
e9dc115
try older cibuildwheel
Sep 6, 2025
5789ce8
try
Sep 7, 2025
40dfb3c
fix
Sep 7, 2025
3c3411a
fixes
Sep 7, 2025
860e5cd
fix
Sep 7, 2025
85a4f90
settings sufficient
Sep 8, 2025
650753e
scripts
Sep 8, 2025
4589e42
builder image setup
Sep 8, 2025
687c559
updates
Sep 8, 2025
c3653e6
list
Sep 8, 2025
9cb2481
update
Sep 8, 2025
256e67e
refactor
Sep 8, 2025
d0f7710
fix
Sep 8, 2025
b73b0cf
ro
Sep 8, 2025
cf8ffc8
better approach with building
Sep 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
176 changes: 89 additions & 87 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,103 +17,107 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos-14 (which is macos-latest) is ARM only. macos-13 is the latest intel runner.
# libunwind from brew has 13.6 as requirement right now, update the 13 runners accordingly.
os: [ ubuntu-latest, macos-13, macos-14 ]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
include:
- os: ubuntu-latest
python-version: "3.9"
cibw-build: "cp39-manylinux_x86_64"
- os: ubuntu-latest
python-version: "3.10"
cibw-build: "cp310-manylinux_x86_64"
- os: ubuntu-latest
python-version: "3.11"
cibw-build: "cp311-manylinux_x86_64"
- os: ubuntu-latest
python-version: "3.12"
cibw-build: "cp312-manylinux_x86_64"
- os: ubuntu-latest
- os: macos-14
python-version: "3.13"
cibw-build: "cp313-manylinux_x86_64"
- os: macos-13
python-version: "3.9"
cibw-build: "cp39-macosx_x86_64"
macos-target: "13.6"
arch: "x86_64"
- os: macos-13
python-version: "3.10"
cibw-build: "cp310-macosx_x86_64"
macos-target: "13.6"
arch: "x86_64"
- os: macos-13
python-version: "3.11"
cibw-build: "cp311-macosx_x86_64"
macos-target: "13.6"
arch: "x86_64"
- os: macos-13
python-version: "3.12"
cibw-build: "cp312-macosx_x86_64"
macos-target: "13.6"
arch: "x86_64"
cibw-build: "cp313-macosx_arm64"
macos-target: "14.0"
arch: "arm64"
- os: macos-13
python-version: "3.13"
cibw-build: "cp313-macosx_x86_64"
macos-target: "13.6"
arch: "x86_64"
- os: macos-14
python-version: "3.9"
cibw-build: "cp39-macosx_arm64"
macos-target: "14.0"
arch: "arm64"
- os: macos-14
python-version: "3.10"
cibw-build: "cp310-macosx_arm64"
macos-target: "14.0"
arch: "arm64"
- os: macos-14
python-version: "3.11"
cibw-build: "cp311-macosx_arm64"
macos-target: "14.0"
arch: "arm64"
- os: macos-14
python-version: "3.12"
cibw-build: "cp312-macosx_arm64"
macos-target: "14.0"
arch: "arm64"
- os: macos-14
python-version: "3.13"
cibw-build: "cp313-macosx_arm64"
macos-target: "14.0"
arch: "arm64"
steps:
- uses: actions/checkout@v4

# disable cache for now.
#- name: Cache brew dependencies
# if: runner.os == 'macOS'
# uses: actions/cache@v4.2.1
# with:
# # Paths to cache:
# # /usr/local/Homebrew - installation folder of Homebrew
# # /usr/local/Cellar - installation folder of Homebrew formulae
# # /usr/local/Frameworks, /usr/local/bin, /usr/local/opt - contain (links to) binaries installed by Homebrew formulae
# path: |
# /usr/local/Homebrew
# /usr/local/Cellar
# /usr/local/Frameworks
# /usr/local/bin
# /usr/local/opt
# # macos13 runners are x86, macos14 are arm. --> use os therefore as cache key.
# key: ${{ matrix.os }}-build-cache-${{ hashFiles('./scripts/macos/brew_dependencies.sh') }}-v2
- name: Checkout repository
uses: actions/checkout@v4

- name: Install macOS dependencies
if: runner.os == 'macOS'
run: |
set -euo pipefail
echo "=== Starting macOS dependency installation ==="
echo "Current PATH: $PATH"
echo "Current architecture: $(uname -m)"
echo "macOS version: $(sw_vers -productVersion)"
echo "Current working directory: $(pwd)"
echo "User: $(whoami)"
echo "Home directory: $HOME"
echo "Brew cellar directory: $(brew --cellar)"
echo "Brew prefix directory: $(brew --prefix)"

# Create /opt directory with correct permissions
USER=$(whoami)
sudo mkdir -p /opt
sudo chown $USER /opt
touch /opt/test

# Handle different Homebrew cellar directories between Apple Silicon and x86_64
# Apple Silicon: /opt/homebrew/Cellar
# Intel x86_64: /usr/local/Cellar

HOMEBREW_PREFIX="$(brew --prefix)"
HOMEBREW_CELLAR="$(brew --cellar)"
ARCH="$(uname -m)"

echo "Homebrew prefix: $HOMEBREW_PREFIX"
echo "Homebrew cellar: $HOMEBREW_CELLAR"
echo "Architecture: $ARCH"

# Ensure /opt/homebrew exists and points to the correct location
if [[ "$ARCH" == "arm64" ]]; then
# Apple Silicon - Homebrew should already be in /opt/homebrew
echo "Apple Silicon detected - using native /opt/homebrew"
if [ ! -d /opt/homebrew ]; then
echo "ERROR: /opt/homebrew not found on Apple Silicon!"
exit 1
fi
else
# Intel x86_64 - Homebrew is in /usr/local, create symlink to /opt/homebrew
echo "Intel x86_64 detected - creating /opt/homebrew symlink"
if [ -L /opt/homebrew ]; then
echo "/opt/homebrew already exists as a symlink"
elif [ -d /opt/homebrew ]; then
echo "Removing existing /opt/homebrew directory"
sudo rm -rf /opt/homebrew
fi

# Create symlink from /opt/homebrew to actual Homebrew prefix
sudo ln -s "$HOMEBREW_PREFIX" /opt/homebrew
echo "Created symlink: /opt/homebrew -> $HOMEBREW_PREFIX"
fi

# Verify the setup
echo "Verifying Homebrew setup:"
echo " /opt/homebrew exists: $([ -e /opt/homebrew ] && echo 'YES' || echo 'NO')"
echo " /opt/homebrew/bin exists: $([ -d /opt/homebrew/bin ] && echo 'YES' || echo 'NO')"
echo " /opt/homebrew/lib exists: $([ -d /opt/homebrew/lib ] && echo 'YES' || echo 'NO')"
echo " /opt/homebrew/Cellar exists: $([ -d /opt/homebrew/Cellar ] && echo 'YES' || echo 'NO')"


# Install dependencies with comprehensive verification
PREFIX=/opt bash ./scripts/macos/brew_dependencies.sh
PREFIX=/opt bash ./scripts/macos/install_antlr4_cpp_runtime.sh
PREFIX=/opt bash ./scripts/macos/install_aws-sdk-cpp.sh

# Set up Java environment
echo 'export PATH="/usr/local/opt/openjdk@11/bin:$PATH"' >> /Users/runner/.bash_profile
export PATH="/usr/local/opt/openjdk@11/bin:$PATH"

# Update environment variables for the build (handle unbound variables with set -u)
export PATH="/opt/homebrew/bin:/opt/bin:/usr/local/bin:${PATH:-}"
export PKG_CONFIG_PATH="/opt/homebrew/lib/pkgconfig:/opt/lib/pkgconfig:/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH:-}"
export CMAKE_PREFIX_PATH="/opt/homebrew:/opt:/usr/local:${CMAKE_PREFIX_PATH:-}"

echo "=== macOS dependency installation completed ==="

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install cibuildwheel
# by default use the latest version, if there are issues use 3.1.4.
run: python -m pip install cibuildwheel==2.22.0

- name: Build wheels
Expand All @@ -125,8 +129,6 @@ jobs:
CIBW_MANYLINUX_X86_64_IMAGE: "registry-1.docker.io/tuplex/ci:${{ matrix.python-version }}"
CIBW_BUILD: ${{ matrix.cibw-build }}

# macOS dependencies separate, for Linux use docker tuplex/ci:3.x images.
CIBW_BEFORE_ALL_MACOS: bash ./scripts/macos/install_antlr4_cpp_runtime.sh && bash ./scripts/macos/brew_dependencies.sh && bash ./scripts/macos/install_aws-sdk-cpp.sh && echo 'export PATH="/usr/local/opt/openjdk@11/bin:$PATH"' >> /Users/runner/.bash_profile

# If CI complains about missing /usr/local/libexec/git-core/git-remote-https: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory
# the OpenSSL3 lib is stored under /usr/local/lib64.
Expand All @@ -136,10 +138,10 @@ jobs:
# To avoid issues, simply use 13.6 for now.
# Fix for Java home from https://github.com/actions/runner-images/discussions/9266.
# For github actions, $HOME is /Users/runner/
CIBW_ENVIRONMENT_MACOS: "ARCH=${{ matrix.arch }} PREFIX=${HOME}/.local MACOSX_DEPLOYMENT_TARGET=${{ matrix.macos-target }} CMAKE_ARGS='-DCMAKE_PREFIX_PATH=/Users/runner/.local -DCMAKE_MODULE_PATH=/Users/runner/.local/cmake/ -DBUILD_WITH_AWS=ON -DBUILD_WITH_ORC=ON' JAVA_HOME=${JAVA_HOME_11_X64:-$JAVA_HOME_11_arm64}"

CIBW_ENVIRONMENT_MACOS: "ARCH=${{ matrix.arch }} PREFIX=${HOME}/.local MACOSX_DEPLOYMENT_TARGET=${{ matrix.macos-target }} PATH=/opt/homebrew/bin:/usr/local/bin:/usr/local/opt/openjdk@11/bin:$PATH PKG_CONFIG_PATH=/opt/homebrew/lib/pkgconfig:/usr/local/lib/pkgconfig CMAKE_PREFIX_PATH=/opt/homebrew:/usr/local:/Users/runner/.local CMAKE_ARGS='-DCMAKE_PREFIX_PATH=/Users/runner/.local:/opt/homebrew:/usr/local -DCMAKE_MODULE_PATH=/Users/runner/.local/cmake/ -DBUILD_WITH_AWS=ON -DBUILD_WITH_ORC=ON -DProtobuf_ROOT=/opt/homebrew -DBoost_ROOT=/opt/homebrew -DBoost_INCLUDE_DIR=/opt/homebrew/include -DBoost_LIBRARY_DIR=/opt/homebrew/lib -DLLVM_ROOT=/opt/homebrew/opt/llvm@15' JAVA_HOME=${JAVA_HOME_11_X64:-$JAVA_HOME_11_arm64}"
# run all python tests to make sure wheels are not defunct
CIBW_TEST_REQUIRES: "pytest pytest-timeout numpy nbformat jupyter"
CIBW_TEST_REQUIRES: "pytest pytest-timeout numpy nbformat jupyter cloudpickle"

# Use following test command when segfaults happen to better pinpoint:
# python3 -X faulthandler -m pytest -p no:faulthandler
Expand Down
17 changes: 12 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
[build-system]
requires = [
"setuptools>=42",
"pip>9",
"setuptools",
"pip",
"wheel",
"cloudpickle",
"numpy",
"ninja; sys_platform != 'win32'",
"ninja;sys_platform!='win32'",
"cmake>=3.25",
"delocate; sys.platform == 'darwin'",
"auditwheel; sys.platform == 'linux'",
"delocate;sys.platform=='darwin'",
"auditwheel;sys.platform=='linux'",
"requests"
]
build-backend = "setuptools.build_meta"

# Ensure cloudpickle and numpy are installed as build-time dependencies when building the wheel.
[tool.cibuildwheel]
before-build = [
"pip install --upgrade pip setuptools wheel",
"pip install cloudpickle numpy"
]
5 changes: 5 additions & 0 deletions scripts/alpine/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Building a minimal alpine image with Tuplex.

Images like python:3.11-alpine use muslc and are extremtly small. However, building for them is not trivial.

This folder here holds a script to create whl files to be used in a python:3.11-alpine image.
12 changes: 12 additions & 0 deletions scripts/alpine/builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM tuplex/musl:latest

# mount tuplex in /code.

# mount wheelhouse in /wheelhouse.

WORKDIR /work

COPY build.sh /work/build.sh
RUN chmod +x /work/build.sh

ENTRYPOINT ["/work/build.sh"]
Loading
Loading