Skip to content

Commit 70f90a2

Browse files
Build using Github Actions (#112)
* remove arm64 * update version * fix version name * update CIBW_REPAIR_WHEEL_COMMAND * added DCMAKE_OSX_ARCHITECTURES * build all os * fix windows build * update readme, version
1 parent ab13a2e commit 70f90a2

File tree

4 files changed

+29
-10
lines changed

4 files changed

+29
-10
lines changed

.github/workflows/build_and_upolad.yaml

+6-7
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ jobs:
8282
os: [ubuntu-latest, macos-latest, windows-latest]
8383
arch: [x86_64, AMD64, i686, arm64]
8484
python: [36, 37, 38, 39]
85+
8586
exclude:
8687
- os: ubuntu-latest
8788
arch: AMD64
@@ -111,22 +112,20 @@ jobs:
111112
CIBW_PLATFORM: linux
112113
CIBW_BUILD: "cp3*-manylinux*"
113114
CIBW_BEFORE_ALL: ""
114-
CIBW_BEFORE_BUILD: "pip install scikit-build"
115+
CIBW_BEFORE_BUILD: ""
115116
CIBW_REPAIR_WHEEL_COMMAND: "auditwheel repair -w {dest_dir} {wheel}"
116-
117+
117118
- os: macos-latest
118119
CIBW_PLATFORM: macos
119120
CIBW_BUILD: "cp3*-macosx*"
120121
CIBW_BEFORE_ALL: ""
121-
CIBW_BEFORE_BUILD: "pip install git+https://github.com/scikit-build/scikit-build.git@master"
122-
CIBW_REPAIR_WHEEL_COMMAND: "delocate-listdeps {wheel} && delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}"
123-
124-
122+
CIBW_BEFORE_BUILD: ""
123+
125124
- os: windows-latest
126125
CIBW_PLATFORM: windows
127126
CIBW_BUILD: "cp3*-win_amd64*"
128127
CIBW_BEFORE_ALL: ""
129-
CIBW_BEFORE_BUILD: "pip install delvewheel scikit-build"
128+
CIBW_BEFORE_BUILD: "pip install delvewheel"
130129
CIBW_REPAIR_WHEEL_COMMAND: "delvewheel repair -w {dest_dir} {wheel}"
131130

132131
fail-fast: false

README.rst

+12-2
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ or
110110
Supported Python Versions
111111
-------------------------
112112

113-
Python 3.7, 3.8 and 3.9 are supported.
113+
Python 3.6, 3.7, 3.8 and 3.9 are supported.
114114

115115
Supported Operating Systems
116116
---------------------------
117117

118118
- Linux (32/64bit)
119-
- OSX (64bit, >=10.9)
119+
- OSX (x86_64(Intel)/arm64(Apple Silicon), 64bit, >=10.9)
120120
- Win (64bit)
121121

122122
.. index-end-marker1
@@ -165,6 +165,14 @@ If you use PyQUBO in your research, please cite `this paper <https://journals.jp
165165

166166
::
167167

168+
@article{zaman2021pyqubo,
169+
title={PyQUBO: Python Library for QUBO Creation},
170+
author={Zaman, Mashiyat and Tanahashi, Kotaro and Tanaka, Shu},
171+
journal={IEEE Transactions on Computers},
172+
year={2021},
173+
publisher={IEEE}
174+
}
175+
168176
@article{tanahashi2019application,
169177
title={Application of Ising Machines and a Software Development for Ising Machines},
170178
author={Tanahashi, Kotaro and Takayanagi, Shinichi and Motohashi, Tomomitsu and Tanaka, Shu},
@@ -191,3 +199,5 @@ Contribution
191199
------------
192200

193201
We welcome contributions to this project. See `CONTRIBUTING <./CONTRIBUTING.rst>`_.
202+
203+
We thank the major contributors, @tail-island, @29rou.

pyqubo/package_info.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# (major, minor, patch, prerelease)
22

3-
VERSION = (1, 0, 13, "")
3+
VERSION = (1, 1, 0, "")
44
__shortversion__ = '.'.join(map(str, VERSION[:3]))
55
__version__ = '.'.join(map(str, VERSION[:3])) + "".join(VERSION[3:])
66

setup.py

+10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import os
22
import subprocess
33
import sys
4+
import platform
5+
import re
46

57
from setuptools import setup, Extension
68
from setuptools.command.build_ext import build_ext
@@ -88,6 +90,14 @@ def build_extension(self, ext):
8890
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}".format(cfg.upper(), extdir)
8991
]
9092
build_args += ["--config", cfg]
93+
94+
if platform.system() == 'Darwin':
95+
96+
# Cross-compile support for macOS - respect ARCHFLAGS if set
97+
archs = re.findall(r"-arch (\S+)", os.environ.get("ARCHFLAGS", ""))
98+
if archs:
99+
cmake_args += ["-DCMAKE_OSX_ARCHITECTURES={}".format(";".join(archs))]
100+
91101

92102
# Set CMAKE_BUILD_PARALLEL_LEVEL to control the parallel build level
93103
# across all generators.

0 commit comments

Comments
 (0)