Skip to content

Commit 8f3d623

Browse files
committed
switchg to curl
1 parent 468e329 commit 8f3d623

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

quaddtype/pyproject.toml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,44 @@ test-extras = ["test"]
3434
[tool.cibuildwheel.linux]
3535
before-all = """
3636
set -ex
37+
# Function to download with curl and fallback to Python if curl fails
38+
download_file() {
39+
if ! curl -L -o "$2" "$1"; then
40+
python -c "import urllib.request; urllib.request.urlretrieve('$1', '$2')"
41+
fi
42+
}
43+
3744
# Download and install a standalone GCC
38-
wget https://github.com/Aetherinox/gcc-arm64/releases/download/12.3.1-2023.10/aarch64-linux-gnu-12.3.1-2023.10-x86_64-linux.tar.xz
39-
tar xf aarch64-linux-gnu-12.3.1-2023.10-x86_64-linux.tar.xz -C /opt
45+
GCC_URL="https://github.com/Aetherinox/gcc-arm64/releases/download/12.3.1-2023.10/aarch64-linux-gnu-12.3.1-2023.10-x86_64-linux.tar.xz"
46+
download_file "$GCC_URL" "gcc.tar.xz"
47+
tar xf gcc.tar.xz -C /opt || echo "Failed to extract GCC"
4048
export PATH="/opt/aarch64-linux-gnu/bin:$PATH"
4149
4250
# Install Miniconda and sleef
43-
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
44-
bash miniconda.sh -b -p $HOME/miniconda
51+
MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh"
52+
download_file "$MINICONDA_URL" "miniconda.sh"
53+
bash miniconda.sh -b -p $HOME/miniconda || echo "Failed to install Miniconda"
4554
export PATH="$HOME/miniconda/bin:$PATH"
46-
conda install -y -c conda-forge sleef
55+
conda install -y -c conda-forge sleef || echo "Failed to install sleef"
4756
4857
# Verify sleef installation
4958
ls -l $HOME/miniconda/include/sleef.h || echo "sleef.h not found"
59+
60+
# Print environment information for debugging
61+
echo "PATH: $PATH"
62+
echo "GCC version:"
63+
gcc --version || echo "GCC not found"
64+
echo "Python version:"
65+
python --version
66+
echo "Conda version:"
67+
conda --version
5068
"""
51-
# have to give in one-line as toml does not allow multi-line here
52-
environment = {PATH = "/opt/aarch64-linux-gnu/bin:$HOME/miniconda/bin:$PATH", LD_LIBRARY_PATH = "/opt/aarch64-linux-gnu/lib:$HOME/miniconda/lib:$LD_LIBRARY_PATH", LIBRARY_PATH = "$HOME/miniconda/lib:$LIBRARY_PATH", CFLAGS = "-I$HOME/miniconda/include -fPIC $CFLAGS", CXXFLAGS = "-I$HOME/miniconda/include -fPIC $CXXFLAGS", LDFLAGS = "-L$HOME/miniconda/lib $LDFLAGS", AUDITWHEEL_PLAT = "manylinux2014_x86_64", CC = "/opt/aarch64-linux-gnu/bin/gcc", CXX = "/opt/aarch64-linux-gnu/bin/g++"}
69+
environment = { PATH = "/opt/aarch64-linux-gnu/bin:$HOME/miniconda/bin:$PATH", LD_LIBRARY_PATH = "/opt/aarch64-linux-gnu/lib:$HOME/miniconda/lib:$LD_LIBRARY_PATH", LIBRARY_PATH = "$HOME/miniconda/lib:$LIBRARY_PATH", CFLAGS = "-I$HOME/miniconda/include -fPIC $CFLAGS", CXXFLAGS = "-I$HOME/miniconda/include -fPIC $CXXFLAGS", LDFLAGS = "-L$HOME/miniconda/lib $LDFLAGS", AUDITWHEEL_PLAT = "manylinux2014_x86_64", CC = "/opt/aarch64-linux-gnu/bin/gcc", CXX = "/opt/aarch64-linux-gnu/bin/g++" }
5370
repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel}"
5471

5572
[tool.cibuildwheel.macos]
5673
before-all = """
57-
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh
74+
curl -L https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o miniconda.sh
5875
bash miniconda.sh -b -p $HOME/miniconda
5976
export PATH="$HOME/miniconda/bin:$PATH"
6077
conda install -y -c conda-forge sleef

0 commit comments

Comments
 (0)