Skip to content

Commit 1213520

Browse files
committed
update workflow file to fix macarm64 install issue
1 parent c67d1bb commit 1213520

File tree

4 files changed

+33
-29
lines changed

4 files changed

+33
-29
lines changed

.github/workflows/bld_wheels_and_upload.yml

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ jobs:
1717
strategy:
1818
matrix:
1919
os: [windows-latest]
20+
2021
steps:
2122
- uses: actions/[email protected]
2223
- name: Build wheels
2324
uses: pypa/[email protected]
2425
env:
2526
CIBW_BUILD: "*-win_amd64"
2627
CIBW_SKIP: "cp36-* pp*"
28+
2729
- uses: actions/[email protected]
2830
with:
2931
name: ibmdb-wheels64-${{ matrix.os }}
@@ -35,13 +37,15 @@ jobs:
3537
strategy:
3638
matrix:
3739
os: [windows-latest]
40+
3841
steps:
3942
- uses: actions/[email protected]
4043
- name: Build wheels
4144
uses: pypa/[email protected]
4245
env:
4346
CIBW_BUILD: "*-win32"
4447
CIBW_SKIP: "cp36-* pp*"
48+
4549
- uses: actions/[email protected]
4650
with:
4751
name: ibmdb-wheels32-${{ matrix.os }}
@@ -53,6 +57,7 @@ jobs:
5357
strategy:
5458
matrix:
5559
os: [ubuntu-latest]
60+
5661
steps:
5762
- uses: actions/[email protected]
5863
- name: Build wheels
@@ -73,51 +78,48 @@ jobs:
7378
--exclude libdl.so.2
7479
--wheel-dir {dest_dir}
7580
{wheel}
81+
7682
- uses: actions/[email protected]
7783
with:
7884
name: ibmdb-wheels-${{ matrix.os }}
7985
path: wheelhouse/*.whl
8086

81-
build_macos_arm64_wheels:
87+
build_wheels_macos_arm64:
8288
name: Build wheels on macOS ARM64
8389
runs-on: macos-14
90+
strategy:
91+
matrix:
92+
architecture: [arm64]
93+
8494
steps:
8595
- uses: actions/[email protected]
8696
- name: Build wheels
8797
uses: pypa/[email protected]
8898
env:
89-
CIBW_SKIP: "cp36-*"
90-
- name: Upload wheels
91-
uses: actions/[email protected]
99+
CIBW_SKIP: "cp36-* cp37-* cp38-* pp*"
100+
MACOSX_DEPLOYMENT_TARGET: 14.0
101+
102+
- uses: actions/[email protected]
92103
with:
93-
name: ibmdb-wheelsarm64-${{ matrix.os }}
104+
name: ibmdb-wheelsarm64
94105
path: wheelhouse/*.whl
95106

96107
build_wheels_macos_x86:
97108
name: Build wheels for macOS x86_64
98109
runs-on: macos-13
99-
100110
strategy:
101111
matrix:
102112
architecture: [x86_64]
103113

104114
steps:
105115
- uses: actions/[email protected]
106-
- name: Install dependencies
107-
run: |
108-
python -m pip install --upgrade pip
109-
pip install cibuildwheel # Install cibuildwheel to build the wheels
110-
111-
- name: Set macOS deployment target
112-
run: echo "MACOSX_DEPLOYMENT_TARGET=10.15" >> $GITHUB_ENV
113-
114-
- name: Build wheels with cibuildwheel
115-
run: |
116-
CIBW_ARCHS_MACOS="${{ matrix.architecture }}"
117-
python -m cibuildwheel --platform macos --output-dir ./wheelhouse
116+
- name: Build wheels
117+
uses: pypa/[email protected]
118+
env:
119+
CIBW_SKIP: "cp36-* pp*"
120+
MACOSX_DEPLOYMENT_TARGET: 10.15
118121

119-
- name: Upload wheels as artifacts
120-
uses: actions/[email protected]
122+
- uses: actions/[email protected]
121123
with:
122124
name: ibmdb-wheelsx86-${{ matrix.os }}
123125
path: wheelhouse/*.whl
@@ -148,6 +150,7 @@ jobs:
148150
rm -rf $PACKAGE
149151
env:
150152
VERSION: ${{ steps.version.outputs.VERSION}}
153+
151154
- name: Upload sdist
152155
uses: actions/[email protected]
153156
with:
@@ -156,7 +159,7 @@ jobs:
156159

157160

158161
upload_pypi:
159-
needs: [build_sdist,build_wheels_linux, build_wheels_windows_64,build_wheels_windows_32, build_macos_arm64_wheels, build_wheels_macos_x86]
162+
needs: [build_wheels_windows_64, build_wheels_windows_32, build_wheels_linux, build_wheels_macos_arm64, build_wheels_macos_x86, build_sdist]
160163
runs-on: ${{ matrix.os }}
161164
strategy:
162165
matrix:

INSTALL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ or
4444
pip install git+https://[email protected]/ibmdb/python-ibm_db.git
4545
```
4646
* `pip install ibm_db` installs python wheel images on Linux, Windows and MacOS(x64) for python v>=3.7
47+
* MacOS(arm64) support python wheel images from python version 3.9 onwards.
4748
* If wheel image is not available or for AIX and zLiux, native C++ code of ibm_db requires in-system compilation. For such case,
4849
you should have a C++ compiler installed in the system. Make sure the commands `gcc --version` and `make --version` works
4950
fine on Linux and MacOS system.
@@ -326,7 +327,7 @@ print('ODBC Test end')
326327
327328
## <a name="m1chip"></a> 3. ibm_db installation on MacOS M1/M2 Chip System (arm64 architecture)
328329
**Important:
329-
> [email protected].4 onwards supports native installation on MacOS ARM64(M* Chip/Apple Silicon Chip) system using clidriver/dsdriver version 12.1.0.
330+
> [email protected].5 onwards supports native installation on MacOS ARM64(M* Chip/Apple Silicon Chip) system using clidriver/dsdriver version 12.1.0.
330331
> You need **db2connect v12.1 license** to connect to z/OS or iSeries server from M1 Chip system.
331332
332333
### Installation:

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ https://github.com/ibmdb/python-ibmdb/wiki/APIs
2121
<a name="prereq"></a>
2222
## Pre-requisites
2323
Install Python 3.7 <= 3.13. The minimum python version supported by driver is python 3.7 and the latest version supported is python 3.13.
24+
MacOS arm64 is supported Python 3.9 onwards.
2425

2526
### To install ibm_db on z/OS system
2627

@@ -30,7 +31,7 @@ Please follow detailed installation instructions as documented here: [ibm_db Ins
3031

3132
### For MacOS M1/M2/ Apple Silicon chip system
3233

33-
**MacOS with Silicon Chip** - Supported from v3.2.4 onwards using v12.x clidriver.
34+
**MacOS with Silicon Chip** - Supported from v3.2.5 onwards using v12.x clidriver.
3435
**MacOS with Intel Chip** - Supported using v11.x clidriver only. By default v11.5.9 clidriver will get downloaded.
3536

3637
### Linux/Unix:
@@ -63,7 +64,7 @@ To install ibm_db from source code after clone from git, or to know the detialed
6364
<a name="installation"></a>
6465
## Installation
6566

66-
* Python **Wheels** are built for Linux, MacOS and Windows operating systems for multiple python versions (from python version 3.7 to 3.11). For other platforms, package gets installed from source distribution.
67+
* Python **Wheels** are built for Linux, MacOS and Windows operating systems for multiple python versions (from python version 3.7 to 3.13). For other platforms, package gets installed from source distribution. For MaxOS arm64, python wheels are available from version 3.9 onwards.
6768

6869
You can install the driver using pip as:
6970

@@ -191,8 +192,7 @@ conda install -c conda-forge ibm_db
191192
## <a name="quick example"></a> Quick Example
192193
```python
193194
$ python
194-
Python 3.6.5 (default, May 10 2018, 00:54:55)
195-
[GCC 4.3.4 [gcc-4_3-branch revision 152973]] on linux
195+
Python 3.13.0 (main, Oct 7 2024, 05:02:14) [Clang 16.0.0 (clang-1600.0.26.4)] on darwin
196196
Type "help", "copyright", "credits" or "license" for more information.
197197
>>> import ibm_db
198198
>>> #For connecting to local database named pydev for user db2inst1 and password secret, use below example
@@ -444,7 +444,7 @@ If you intend to install the clidriver manually, Following are the details of th
444444
|AIX | ppc |aix32_odbc_cli.tar.gz | Yes | V11.5.9 |
445445
| | others |aix64_odbc_cli.tar.gz | Yes | V11.5.9 |
446446
|Darwin | x64 |macos64_odbc_cli.tar.gz | Yes | Till V11.5.9 |
447-
| arm64 |macarm64_odbc_cli.tar.gz | Yes | From V12.1.0 |
447+
| | arm64 |macarm64_odbc_cli.tar.gz | Yes | From V12.1.0 |
448448
|Linux | x64 |linuxx64_odbc_cli.tar.gz | Yes | V11.5.9 |
449449
| | s390x |s390x64_odbc_cli.tar.gz | Yes | V11.5.9 |
450450
| | s390 |s390_odbc_cli.tar.gz | Yes | V11.1 |

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
22
requires = ["setuptools"]
33
build-backend = "setuptools.build_meta"
4-
[tool.cibuildwheel.macos]
4+
[tool.cibuildwheel.macos]
55
repair-wheel-command = "delocate-wheel --ignore-missing-dependencies --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
6-
skip = "cp36-macosx_x86_64"
6+
skip = "cp36-* pp*"

0 commit comments

Comments
 (0)