From e043f2783e2be9ea5f759bbffc469ded24cd2d49 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Fri, 15 Nov 2024 10:56:11 -0500 Subject: [PATCH 1/5] Run faster! --- setup.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 27695b6..ade41aa 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,8 @@ from setuptools import setup from setuptools.extension import Extension +import platform import sys -import os import versioneer DEBUGMODE = False @@ -24,6 +24,11 @@ break extra_compile_args.append("-std=c99") +if platform.machine() == "x86_64" and platform.system().lower().startswith("linux"): + # Only support CPUs starting from 2008/2009 or so, and run twice as fast as + # a result! + extra_compile_args.append("-march=x86-64-v2") + if DEBUGMODE: extra_compile_args.append("-O0") extra_compile_args.append("-g") From 8397393d2ee5074cc1e019655296d13f413269a4 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Fri, 15 Nov 2024 10:56:54 -0500 Subject: [PATCH 2/5] Drop 3.8, it's end of life --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 58f3f88..850d955 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,7 +38,6 @@ jobs: - "ubuntu-22.04" - "windows-2022" wheel-selector: - - "cp38-*" - "cp39-*" - "cp310-*" - "cp311-*" From 6c6e61c879dd7bedd3951449bb0dc685fe7b2b0b Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Fri, 15 Nov 2024 10:58:41 -0500 Subject: [PATCH 3/5] Mention gcc requirement --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ade41aa..8c1789d 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ extra_compile_args.append("-std=c99") if platform.machine() == "x86_64" and platform.system().lower().startswith("linux"): # Only support CPUs starting from 2008/2009 or so, and run twice as fast as - # a result! + # a result! This requires sufficiently new gcc, 11 maybe? extra_compile_args.append("-march=x86-64-v2") if DEBUGMODE: From 27f43c49362e3e86ebe60eacb0c167907ed8dad5 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Fri, 15 Nov 2024 10:59:33 -0500 Subject: [PATCH 4/5] Modern manylinux --- .github/workflows/build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 850d955..6e0c136 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,7 +56,7 @@ jobs: fetch-depth: 0 - name: Build wheels - uses: pypa/cibuildwheel@v2.20.0 + uses: pypa/cibuildwheel@v2.21.3 with: output-dir: wheelhouse env: @@ -70,6 +70,11 @@ jobs: CIBW_ARCHS_MACOS: "x86_64 universal2 arm64" # Skip testing arm64 builds on Intel Macs. CIBW_TEST_SKIP: "*-macosx_arm64 *-macosx_universal2:arm64" + # Use newer manylinux so we get newer gcc and can take advantage of + # speed boost from x86-64-v2, at the cost of not supporting some old + # patch releases of Python 3.9 if they haven't updated pip in their + # virtualenv. + CIBW_MANYLINUX_X86_64_IMAGE: "manylinux_2_28" - uses: actions/upload-artifact@v3 name: Upload artifacts with: From 2ccec24d69fb0eabe601ed410094d7f27a7f35ab Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Fri, 15 Nov 2024 11:02:17 -0500 Subject: [PATCH 5/5] Drop 3.8, update to released 3.13 --- .github/workflows/test.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 852ee25..2a51799 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,13 +21,11 @@ jobs: - "ubuntu-22.04" - "windows-2022" python-version: - - "3.8" - "3.9" - "3.10" - "3.11" - "3.12" - - "3.13-dev" - - "pypy-3.8" + - "3.13" - "pypy-3.9" - "pypy-3.10"