@@ -34,27 +34,44 @@ test-extras = ["test"]
34
34
[tool .cibuildwheel .linux ]
35
35
before-all = """
36
36
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
+
37
44
# 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"
40
48
export PATH="/opt/aarch64-linux-gnu/bin:$PATH"
41
49
42
50
# 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"
45
54
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"
47
56
48
57
# Verify sleef installation
49
58
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
50
68
"""
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++" }
53
70
repair-wheel-command = " auditwheel repair -w {dest_dir} {wheel}"
54
71
55
72
[tool .cibuildwheel .macos ]
56
73
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
58
75
bash miniconda.sh -b -p $HOME/miniconda
59
76
export PATH="$HOME/miniconda/bin:$PATH"
60
77
conda install -y -c conda-forge sleef
0 commit comments