Skip to content

Commit e5ba2ef

Browse files
committed
Cleanup scripts/cibw_before_all.sh
1 parent e46e68d commit e5ba2ef

File tree

3 files changed

+23
-19
lines changed

3 files changed

+23
-19
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ build-frontend = {name="build", args=["--verbose"]}
6969
enable = "pypy cpython-prerelease cpython-freethreading graalpy"
7070
skip = """*-win32 gp311_242* *-manylinux_i686 *-musllinux_* \
7171
*-manylinux_armv7l pp*aarch64* gp3*win*"""
72-
before-all = "bash scripts/cibw_before_all.sh"
72+
before-all = "sh scripts/cibw_before_all.sh"
7373
test-extras = "tests"
7474
test-command = "pytest {package}"
7575

@@ -81,7 +81,7 @@ CFLAGS = "-Wall -Wpedantic -Werror -std=c17 -Wconversion"
8181

8282
[tool.cibuildwheel.windows]
8383
before-all = "msys2 -c scripts/cibw_before_all.sh"
84-
before-build = "pip install wheel delvewheel"
84+
before-build = "pip install delvewheel"
8585
repair-wheel-command = """delvewheel repair -w {dest_dir} {wheel} \
8686
--add-path .local/bin"""
8787

scripts/cibw_before_all.sh

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
1-
#!/bin/bash
1+
#!/bin/sh
22

33
set -e -x
44

55
GMP_VERSION=6.3.0
6-
6+
GMP_DIR=gmp-${GMP_VERSION}
7+
GMP_URL=https://ftp.gnu.org/gnu/gmp/${GMP_DIR}.tar.xz
78
PREFIX="$(pwd)/.local/"
9+
CFLAGS=
810

9-
# -- build GMP --
10-
curl -s -O https://ftp.gnu.org/gnu/gmp/gmp-${GMP_VERSION}.tar.xz
11-
tar -xf gmp-${GMP_VERSION}.tar.xz
12-
cd gmp-${GMP_VERSION}
13-
patch -N -Z -p1 < ../scripts/fat_build_fix.diff
14-
patch -N -Z -p0 < ../scripts/dll-importexport.diff
15-
patch -N -Z -p1 < ../scripts/gcc15.diff
11+
curl --retry 3 --silent --remote-name ${GMP_URL}
12+
tar --extract --file ${GMP_DIR}.tar.xz
13+
cd ${GMP_DIR}
1614

17-
unset CFLAGS
15+
for f in ../scripts/*.diff
16+
do
17+
patch --strip 1 < $f
18+
done
1819

1920
# config.guess uses microarchitecture and configfsf.guess doesn't
2021
# We replace config.guess with configfsf.guess to avoid microarchitecture
2122
# specific code in common code.
2223
rm config.guess && mv configfsf.guess config.guess && chmod +x config.guess
24+
2325
./configure --enable-fat \
2426
--enable-shared \
2527
--disable-static \
2628
--with-pic \
2729
--disable-alloca \
28-
--prefix=$PREFIX -q
29-
make -j6 -s
30-
make -s install
31-
cd ../
30+
--prefix=$PREFIX \
31+
--quiet
32+
33+
make --silent all install

scripts/dll-importexport.diff

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# https://gmplib.org/list-archives/gmp-devel/2025-August/006311.html
22
#
3-
--- gmp-h.in.orig 2025-08-15 13:37:06.328877394 +0300
4-
+++ gmp-h.in 2025-08-15 13:40:01.036262673 +0300
5-
@@ -101,8 +101,13 @@
3+
diff --git a/gmp-h.in b/gmp-h.in
4+
index 8598e97..6649434 100644
5+
--- a/gmp-h.in
6+
+++ b/gmp-h.in
7+
@@ -101,8 +101,13 @@ see https://www.gnu.org/licenses/. */
68
make use of that. Probably more trouble than it's worth. */
79

810
#if defined (__GNUC__)

0 commit comments

Comments
 (0)