diff --git a/.github/workflows/build_and_upolad.yaml b/.github/workflows/build_and_upolad.yaml index a0bb0be2..70957283 100644 --- a/.github/workflows/build_and_upolad.yaml +++ b/.github/workflows/build_and_upolad.yaml @@ -82,6 +82,7 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] arch: [x86_64, AMD64, i686, arm64] python: [36, 37, 38, 39] + exclude: - os: ubuntu-latest arch: AMD64 @@ -111,22 +112,20 @@ jobs: CIBW_PLATFORM: linux CIBW_BUILD: "cp3*-manylinux*" CIBW_BEFORE_ALL: "" - CIBW_BEFORE_BUILD: "pip install scikit-build" + CIBW_BEFORE_BUILD: "" CIBW_REPAIR_WHEEL_COMMAND: "auditwheel repair -w {dest_dir} {wheel}" - + - os: macos-latest CIBW_PLATFORM: macos CIBW_BUILD: "cp3*-macosx*" CIBW_BEFORE_ALL: "" - CIBW_BEFORE_BUILD: "pip install git+https://github.com/scikit-build/scikit-build.git@master" - CIBW_REPAIR_WHEEL_COMMAND: "delocate-listdeps {wheel} && delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}" - - + CIBW_BEFORE_BUILD: "" + - os: windows-latest CIBW_PLATFORM: windows CIBW_BUILD: "cp3*-win_amd64*" CIBW_BEFORE_ALL: "" - CIBW_BEFORE_BUILD: "pip install delvewheel scikit-build" + CIBW_BEFORE_BUILD: "pip install delvewheel" CIBW_REPAIR_WHEEL_COMMAND: "delvewheel repair -w {dest_dir} {wheel}" fail-fast: false diff --git a/README.rst b/README.rst index 8d8e0df3..7ee13614 100644 --- a/README.rst +++ b/README.rst @@ -110,13 +110,13 @@ or Supported Python Versions ------------------------- -Python 3.7, 3.8 and 3.9 are supported. +Python 3.6, 3.7, 3.8 and 3.9 are supported. Supported Operating Systems --------------------------- - Linux (32/64bit) -- OSX (64bit, >=10.9) +- OSX (x86_64(Intel)/arm64(Apple Silicon), 64bit, >=10.9) - Win (64bit) .. index-end-marker1 @@ -165,6 +165,14 @@ If you use PyQUBO in your research, please cite `this paper `_. + +We thank the major contributors, @tail-island, @29rou. \ No newline at end of file diff --git a/pyqubo/package_info.py b/pyqubo/package_info.py index 19dc12ac..188d0de2 100644 --- a/pyqubo/package_info.py +++ b/pyqubo/package_info.py @@ -1,6 +1,6 @@ # (major, minor, patch, prerelease) -VERSION = (1, 0, 13, "") +VERSION = (1, 1, 0, "") __shortversion__ = '.'.join(map(str, VERSION[:3])) __version__ = '.'.join(map(str, VERSION[:3])) + "".join(VERSION[3:]) diff --git a/setup.py b/setup.py index 101fae45..a234a6bb 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,8 @@ import os import subprocess import sys +import platform +import re from setuptools import setup, Extension from setuptools.command.build_ext import build_ext @@ -88,6 +90,14 @@ def build_extension(self, ext): "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}".format(cfg.upper(), extdir) ] build_args += ["--config", cfg] + + if platform.system() == 'Darwin': + + # Cross-compile support for macOS - respect ARCHFLAGS if set + archs = re.findall(r"-arch (\S+)", os.environ.get("ARCHFLAGS", "")) + if archs: + cmake_args += ["-DCMAKE_OSX_ARCHITECTURES={}".format(";".join(archs))] + # Set CMAKE_BUILD_PARALLEL_LEVEL to control the parallel build level # across all generators.