diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3e882ba..0c95b5a8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,6 +69,13 @@ jobs: arch: manylinux2014 intel: manylinux2014 matrix: '3.11' + - major-dot-minor: '3.12' + cibw-build: 'cp312-*' + manylinux: + arch: manylinux2014 + intel: manylinux2014 + matrix: '3.12' + arch: - name: ARM matrix: arm @@ -87,19 +94,6 @@ jobs: arch: name: ARM matrix: arm - - os: - name: macOS - matrix: macos - runs-on: - arm: [macOS, ARM64] - intel: [macos-11] - python: - major-dot-minor: '3.7' - cibw-build: 'cp37-*' - matrix: '3.7' - arch: - name: ARM - matrix: arm steps: - name: Clean workspace @@ -126,7 +120,7 @@ jobs: CIBW_ARCHS_MACOS: ${{ matrix.os.cibw-archs-macos[matrix.arch.matrix] }} CIBW_PRERELEASE_PYTHONS: True run: - pipx run --spec='cibuildwheel==2.11.2' cibuildwheel --output-dir dist 2>&1 + pipx run --spec='cibuildwheel==2.16.2' cibuildwheel --output-dir dist 2>&1 - name: Upload artifacts uses: actions/upload-artifact@v3 diff --git a/pyproject.toml b/pyproject.toml index 5d4e7631..a70d9254 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,18 +39,10 @@ environment = {MACOSX_DEPLOYMENT_TARGET="11", SYSTEM_VERSION_COMPAT=0, BUILD_VDF [tool.cibuildwheel.windows] build-verbosity = 0 before-all = "git clone https://github.com/Chia-Network/mpir_gc_x64.git" -environment = {BUILD_VDF_CLIENT="N", SETUPTOOLS_USE_DISTUTILS="stdlib"} +environment = {BUILD_VDF_CLIENT="N"} +before-build = "pip install delvewheel" repair-wheel-command = """ -ls -l mpir_gc_x64 && pip uninstall -y delocate \ -&& pip install git+https://github.com/Chia-Network/delocate.git \ -&& delocate-wheel -v -i mpir_gc_x64/mpir.dll {wheel} \ -&& delocate-wheel -v -i mpir_gc_x64/mpir_gc.dll {wheel} \ -&& delocate-wheel -v -i mpir_gc_x64/mpir_broadwell.dll {wheel} \ -&& delocate-wheel -v -i mpir_gc_x64/mpir_broadwell_avx.dll {wheel} \ -&& delocate-wheel -v -i mpir_gc_x64/mpir_bulldozer.dll {wheel} \ -&& delocate-wheel -v -i mpir_gc_x64/mpir_haswell.dll {wheel} \ -&& delocate-wheel -v -i mpir_gc_x64/mpir_piledriver.dll {wheel} \ -&& delocate-wheel -v -i mpir_gc_x64/mpir_sandybridge.dll {wheel} \ -&& delocate-wheel -v -i mpir_gc_x64/mpir_skylake_avx.dll {wheel} \ -&& cp {wheel} {dest_dir} \ +delvewheel repair -v -w {dest_dir} {wheel} \ +--add-path mpir_gc_x64 \ +--add-dll mpir.dll;mpir_gc.dll;mpir_broadwell.dll;mpir_broadwell_avx.dll;mpir_bulldozer.dll;mpir_haswell.dll;mpir_piledriver.dll;mpir_sandybridge.dll;mpir_skylake_avx.dll \ """ diff --git a/setup.py b/setup.py index a030c498..47a68a35 100644 --- a/setup.py +++ b/setup.py @@ -1,15 +1,13 @@ import os import platform -import re import shutil import subprocess import sys -from distutils.command.install import install -from distutils.version import LooseVersion from setuptools import Command, Extension, setup, errors from setuptools.command.build import build from setuptools.command.build_ext import build_ext +from setuptools.command.install import install BUILD_HOOKS = [] INSTALL_HOOKS = [] @@ -93,7 +91,7 @@ def invoke_make(**kwargs): class CMakeBuild(build_ext): def run(self): try: - out = subprocess.check_output(["cmake", "--version"]) + subprocess.check_output(["cmake", "--version"]) except OSError: raise RuntimeError( "CMake must be installed to build" @@ -101,13 +99,6 @@ def run(self): + ", ".join(e.name for e in self.extensions) ) - if platform.system() == "Windows": - cmake_version = LooseVersion( - re.search(r"version\s*([\d.]+)", out.decode()).group(1) - ) - if cmake_version < "3.1.0": - raise RuntimeError("CMake >= 3.1.0 is required on Windows") - for ext in self.extensions: self.build_extension(ext)