Skip to content

Commit c5077ae

Browse files
Merge branch 'master' into pr_py313
2 parents 74a0ebc + b1c0d49 commit c5077ae

File tree

7 files changed

+70
-68
lines changed

7 files changed

+70
-68
lines changed

.github/dependabot.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: github-actions
9+
directory: "/"
10+
schedule:
11+
interval: "monthly"

.github/workflows/buildwheel.yml

+22-35
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
os: [ubuntu-20.04, windows-2019, macos-12]
1414

1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717

18-
- uses: actions/setup-python@v4
18+
- uses: actions/setup-python@v5
1919
with:
2020
python-version: '3.10'
2121

@@ -34,45 +34,32 @@ jobs:
3434
- name: Build wheels
3535
uses: pypa/[email protected]
3636
env:
37-
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-*
38-
CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux_*"
39-
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
40-
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
41-
CIBW_BEFORE_ALL_LINUX: bin/cibw_before_all_linux.sh
42-
CIBW_BEFORE_ALL_MACOS: bin/cibw_before_all_macosx_x86_64.sh
37+
# override setting in pyproject.toml to use msys2 instead of msys64 bash
4338
CIBW_BEFORE_ALL_WINDOWS: msys2 -c bin/cibw_before_all_windows.sh
44-
CIBW_BEFORE_BUILD_WINDOWS: msys2 -c bin/cibw_before_build_windows.sh
45-
CIBW_BEFORE_BUILD: pip install numpy setuptools cython delvewheel
46-
CIBW_ENVIRONMENT: >
47-
C_INCLUDE_PATH=$(pwd)/.local/include/
48-
LIBRARY_PATH=$(pwd)/.local/lib/
49-
LD_LIBRARY_PATH=$(pwd)/.local/lib:$LD_LIBRARY_PATH
50-
PYTHON_FLINT_MINGW64=true
51-
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >-
52-
bin\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel}
53-
CIBW_TEST_COMMAND: python -c "import flint; print(str(flint.fmpz(2)))"
54-
55-
- uses: actions/upload-artifact@v3
39+
CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel && msys2 -c bin/cibw_before_build_windows.sh
40+
41+
- uses: actions/upload-artifact@v4
5642
with:
43+
name: wheels-${{ matrix.os }}
5744
path: wheelhouse/*.whl
5845

5946
build_sdist:
6047
name: Build sdist
6148
runs-on: ubuntu-20.04
6249

6350
steps:
64-
- uses: actions/checkout@v3
51+
- uses: actions/checkout@v4
6552

66-
- uses: actions/setup-python@v4
53+
- uses: actions/setup-python@v5
6754
with:
6855
python-version: '3.12'
6956

70-
- run: pip install --upgrade pip
71-
- run: pip install cython setuptools
72-
- run: python setup.py sdist
57+
- run: pip install build
58+
- run: python -m build --sdist
7359

74-
- uses: actions/upload-artifact@v3
60+
- uses: actions/upload-artifact@v4
7561
with:
62+
name: sdist
7663
path: dist/*.tar.gz
7764

7865
test_rst:
@@ -81,15 +68,15 @@ jobs:
8168
runs-on: ubuntu-20.04
8269

8370
steps:
84-
- uses: actions/checkout@v3
71+
- uses: actions/checkout@v4
8572

86-
- uses: actions/setup-python@v4
73+
- uses: actions/setup-python@v5
8774
with:
8875
python-version: '3.12'
8976

90-
- uses: actions/download-artifact@v3
77+
- uses: actions/download-artifact@v4
9178
with:
92-
name: artifact
79+
name: wheels-ubuntu-20.04
9380
path: wheelhouse
9481

9582
- run: pip install --upgrade pip
@@ -108,12 +95,12 @@ jobs:
10895
python-version: ['3.9', '3.10', '3.11', '3.12']
10996

11097
steps:
111-
- uses: actions/setup-python@v4
98+
- uses: actions/setup-python@v5
11299
with:
113100
python-version: ${{ matrix.python-version }}
114-
- uses: actions/download-artifact@v3
101+
- uses: actions/download-artifact@v4
115102
with:
116-
name: artifact
103+
name: wheels-${{ matrix.os }}
117104
path: wheelhouse
118105
- run: pip install --no-index --find-links wheelhouse python_flint
119106
- run: python -m flint.test --verbose
@@ -129,8 +116,8 @@ jobs:
129116
# 'python-flint' means install from PyPI sdist
130117
target: ['.', 'python-flint']
131118
steps:
132-
- uses: actions/checkout@v3
133-
- uses: actions/setup-python@v4
119+
- uses: actions/checkout@v4
120+
- uses: actions/setup-python@v5
134121
with:
135122
python-version: ${{ matrix.python-version }}
136123
- run: bin/pip_install_ubuntu.sh ${{ matrix.target }}

bin/build_dependencies_unix.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ if [ $USE_GMP = "gmp" ]; then
174174
--enable-shared=yes\
175175
--enable-static=no\
176176
--host=$HOST_ARG
177-
make -j3
177+
make -j6
178178
make install
179179

180180
cd ..
@@ -195,7 +195,7 @@ else
195195
tar xf yasm-$YASMVER.tar.gz
196196
cd yasm-$YASMVER
197197
./configure --prefix=$PREFIX
198-
make -j3
198+
make -j6
199199
make install
200200
cd ..
201201

@@ -226,7 +226,7 @@ else
226226
--enable-shared=yes\
227227
--enable-static=no\
228228
--enable-gmpcompat
229-
make -j3
229+
make -j6
230230
make install
231231
cd ..
232232

@@ -260,7 +260,7 @@ else
260260
--with-gmp=$PREFIX\
261261
--enable-shared=yes\
262262
--enable-static=no
263-
make -j3
263+
make -j6
264264
make install
265265
cd ..
266266
fi
@@ -285,7 +285,7 @@ cd flint-$FLINTVER
285285
$FLINTARB_WITHGMP\
286286
--with-mpfr=$PREFIX\
287287
--disable-static
288-
make -j3
288+
make -j6
289289
make install
290290
cd ..
291291

@@ -312,7 +312,7 @@ if [ $BUILD_ARB = "yes" ]; then
312312
$FLINTARB_WITHGMP\
313313
--with-mpfr=$PREFIX\
314314
--disable-static
315-
make -j3
315+
make -j6
316316
make install
317317
#
318318
# Set PATH so that DLLs are picked up on Windows.

bin/cibw.bat

+1-6
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,7 @@ rem wheels from a previous run so we delete them here.
2121
rem
2222
del /q wheelhouse\*
2323

24+
rem override setting in pyproject.toml
2425
set CIBW_BUILD=cp39-* cp310-* cp311-*
25-
set CIBW_SKIP=*-win32 *-manylinux_i686 *-musllinux_*
26-
set CIBW_BEFORE_ALL_WINDOWS=C:\msys64\usr\bin\bash bin/cibw_before_all_windows.sh
27-
set CIBW_BEFORE_BUILD_WINDOWS=C:\msys64\usr\bin\bash bin/cibw_before_build_windows.sh
28-
set CIBW_ENVIRONMENT=PYTHON_FLINT_MINGW64=true
29-
set CIBW_REPAIR_WHEEL_COMMAND_WINDOWS=bin\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel}
30-
set CIBW_TEST_COMMAND=python -c "import flint; print(str(flint.fmpz(2)))"
3126

3227
cibuildwheel --platform windows

bin/cibw.sh

+1-19
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,10 @@
88

99
rm -f wheelhouse/*
1010

11-
# bin/build_dependencies_unix.sh places headers and shared libraries under .local
12-
export CIBW_ENVIRONMENT='C_INCLUDE_PATH=$(pwd)/.local/include/ LIBRARY_PATH=$(pwd)/.local/lib/ LD_LIBRARY_PATH=$(pwd)/.local/lib:$LD_LIBRARY_PATH PYTHON_FLINT_MINGW64=true'
13-
14-
export CIBW_BUILD='cp39-* cp310-* cp311-* cp312-*'
15-
# export CIBW_BUILD='cp311-*'
16-
export CIBW_SKIP='*-win32 *-manylinux_i686 *-musllinux_*'
17-
1811
# export CIBW_ARCHS_MACOS="x86_64"
1912
export CIBW_ARCHS_MACOS="arm64"
2013

21-
export CIBW_BEFORE_ALL_LINUX=bin/cibw_before_all_linux.sh
22-
# export CIBW_BEFORE_ALL_MACOS=bin/cibw_before_all_macosx_x86_64.sh
23-
export CIBW_BEFORE_ALL_MACOS=bin/cibw_before_all_macosx_arm64.sh
24-
export CIBW_BEFORE_ALL_WINDOWS='C:\\msys64\\usr\\bin\\bash bin/cibw_before_all_windows.sh'
25-
26-
export CIBW_BEFORE_BUILD='pip install numpy cython delvewheel'
27-
export CIBW_BEFORE_BUILD_WINDOWS='C:\\msys64\\usr\\bin\\bash bin/cibw_before_build_windows.sh'
28-
29-
export CIBW_REPAIR_WHEEL_COMMAND_WINDOWS='bin\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel}'
30-
31-
# export CIBW_TEST_COMMAND="python -c 'import flint; print(str(flint.fmpz(2)))'"
32-
export CIBW_TEST_COMMAND="python -m flint.test"
14+
export CIBW_TEST_COMMAND="python -m flint.test" # override setting in pyproject.toml
3315

3416
# cibuildwheel --platform linux
3517
# cibuildwheel --platform windows

bin/pip_install_ubuntu.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ sudo ldconfig /usr/local/lib
7171
echo -----------------------------------------------------------
7272
echo
7373
echo Running:
74-
echo $ pip install --no-binary :all: $PYTHON_FLINT
74+
echo $ pip install --no-binary python-flint $PYTHON_FLINT
7575
echo
7676
echo -----------------------------------------------------------
7777

78-
pip install --no-binary :all: $PYTHON_FLINT
78+
pip install --no-binary python-flint $PYTHON_FLINT

pyproject.toml

+27
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,30 @@ classifiers = [
2020
[project.readme]
2121
file = "README.md"
2222
content-type = "text/markdown"
23+
24+
[tool.cibuildwheel]
25+
build = "cp39-* cp310-* cp311-* cp312-*"
26+
skip = "*-win32 *-manylinux_i686 *-musllinux_*"
27+
manylinux-x86_64-image = "manylinux2014"
28+
manylinux-i686-image = "manylinux2014"
29+
test-command = "python -c \"import flint; print(str(flint.fmpz(2)))\""
30+
31+
[tool.cibuildwheel.environment]
32+
# bin/build_dependencies_unix.sh places headers and shared libraries under .local
33+
C_INCLUDE_PATH = "$(pwd)/.local/include/"
34+
LIBRARY_PATH = "$(pwd)/.local/lib/"
35+
LD_LIBRARY_PATH = "$(pwd)/.local/lib:$LD_LIBRARY_PATH"
36+
37+
[tool.cibuildwheel.linux]
38+
before-all = "bin/cibw_before_all_linux.sh"
39+
40+
[tool.cibuildwheel.macos]
41+
before-all = "bin/cibw_before_all_macosx_$(uname -m).sh"
42+
43+
[tool.cibuildwheel.windows]
44+
before-all = "C:\\msys64\\usr\\bin\\bash bin/cibw_before_all_windows.sh"
45+
before-build = "pip install delvewheel && C:\\msys64\\usr\\bin\\bash bin/cibw_before_build_windows.sh"
46+
repair-wheel-command = "bin\\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel}"
47+
48+
[tool.cibuildwheel.windows.environment]
49+
PYTHON_FLINT_MINGW64 = "true"

0 commit comments

Comments
 (0)