diff --git a/.github/workflows/bld_wheels_and_upload.yml b/.github/workflows/bld_wheels_and_upload.yml index 0caef417..a0583297 100644 --- a/.github/workflows/bld_wheels_and_upload.yml +++ b/.github/workflows/bld_wheels_and_upload.yml @@ -17,6 +17,7 @@ jobs: strategy: matrix: os: [windows-latest] + steps: - uses: actions/checkout@v4.2.2 - name: Build wheels @@ -24,6 +25,7 @@ jobs: env: CIBW_BUILD: "*-win_amd64" CIBW_SKIP: "cp36-* pp*" + - uses: actions/upload-artifact@v4.4.3 with: name: ibmdb-wheels64-${{ matrix.os }} @@ -35,6 +37,7 @@ jobs: strategy: matrix: os: [windows-latest] + steps: - uses: actions/checkout@v4.2.2 - name: Build wheels @@ -42,6 +45,7 @@ jobs: env: CIBW_BUILD: "*-win32" CIBW_SKIP: "cp36-* pp*" + - uses: actions/upload-artifact@v4.4.3 with: name: ibmdb-wheels32-${{ matrix.os }} @@ -53,6 +57,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] + steps: - uses: actions/checkout@v4.2.2 - name: Build wheels @@ -73,51 +78,48 @@ jobs: --exclude libdl.so.2 --wheel-dir {dest_dir} {wheel} + - uses: actions/upload-artifact@v4.4.3 with: name: ibmdb-wheels-${{ matrix.os }} path: wheelhouse/*.whl - build_macos_arm64_wheels: + build_wheels_macos_arm64: name: Build wheels on macOS ARM64 runs-on: macos-14 + strategy: + matrix: + architecture: [arm64] + steps: - uses: actions/checkout@v4.2.2 - name: Build wheels uses: pypa/cibuildwheel@v2.22.0 env: - CIBW_SKIP: "cp36-*" - - name: Upload wheels - uses: actions/upload-artifact@v4.4.3 + CIBW_SKIP: "cp36-* cp37-* cp38-* pp*" + MACOSX_DEPLOYMENT_TARGET: 14.0 + + - uses: actions/upload-artifact@v4.4.3 with: - name: ibmdb-wheelsarm64-${{ matrix.os }} + name: ibmdb-wheelsarm64 path: wheelhouse/*.whl build_wheels_macos_x86: name: Build wheels for macOS x86_64 runs-on: macos-13 - strategy: matrix: architecture: [x86_64] steps: - uses: actions/checkout@v4.2.2 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install cibuildwheel # Install cibuildwheel to build the wheels - - - name: Set macOS deployment target - run: echo "MACOSX_DEPLOYMENT_TARGET=10.15" >> $GITHUB_ENV - - - name: Build wheels with cibuildwheel - run: | - CIBW_ARCHS_MACOS="${{ matrix.architecture }}" - python -m cibuildwheel --platform macos --output-dir ./wheelhouse + - name: Build wheels + uses: pypa/cibuildwheel@v2.22.0 + env: + CIBW_SKIP: "cp36-* pp*" + MACOSX_DEPLOYMENT_TARGET: 10.15 - - name: Upload wheels as artifacts - uses: actions/upload-artifact@v4.4.3 + - uses: actions/upload-artifact@v4.4.3 with: name: ibmdb-wheelsx86-${{ matrix.os }} path: wheelhouse/*.whl @@ -148,6 +150,7 @@ jobs: rm -rf $PACKAGE env: VERSION: ${{ steps.version.outputs.VERSION}} + - name: Upload sdist uses: actions/upload-artifact@v4.4.3 with: @@ -156,7 +159,7 @@ jobs: upload_pypi: - needs: [build_sdist,build_wheels_linux, build_wheels_windows_64,build_wheels_windows_32, build_macos_arm64_wheels, build_wheels_macos_x86] + needs: [build_wheels_windows_64, build_wheels_windows_32, build_wheels_linux, build_wheels_macos_arm64, build_wheels_macos_x86, build_sdist] runs-on: ${{ matrix.os }} strategy: matrix: diff --git a/INSTALL.md b/INSTALL.md index ba01ac74..cca8e0bb 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -44,6 +44,7 @@ or pip install git+https://git@github.com/ibmdb/python-ibm_db.git ``` * `pip install ibm_db` installs python wheel images on Linux, Windows and MacOS(x64) for python v>=3.7 +* MacOS(arm64) support python wheel images from python version 3.9 onwards. * If wheel image is not available or for AIX and zLiux, native C++ code of ibm_db requires in-system compilation. For such case, you should have a C++ compiler installed in the system. Make sure the commands `gcc --version` and `make --version` works fine on Linux and MacOS system. @@ -326,7 +327,7 @@ print('ODBC Test end') ## 3. ibm_db installation on MacOS M1/M2 Chip System (arm64 architecture) **Important: -> ibm_db@3.2.4 onwards supports native installation on MacOS ARM64(M* Chip/Apple Silicon Chip) system using clidriver/dsdriver version 12.1.0. +> ibm_db@3.2.5 onwards supports native installation on MacOS ARM64(M* Chip/Apple Silicon Chip) system using clidriver/dsdriver version 12.1.0. > You need **db2connect v12.1 license** to connect to z/OS or iSeries server from M1 Chip system. ### Installation: diff --git a/README.md b/README.md index 0cd3c03d..4834a980 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ https://github.com/ibmdb/python-ibmdb/wiki/APIs ## Pre-requisites 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. +MacOS arm64 is supported Python 3.9 onwards. ### To install ibm_db on z/OS system @@ -30,7 +31,7 @@ Please follow detailed installation instructions as documented here: [ibm_db Ins ### For MacOS M1/M2/ Apple Silicon chip system - **MacOS with Silicon Chip** - Supported from v3.2.4 onwards using v12.x clidriver. + **MacOS with Silicon Chip** - Supported from v3.2.5 onwards using v12.x clidriver. **MacOS with Intel Chip** - Supported using v11.x clidriver only. By default v11.5.9 clidriver will get downloaded. ### Linux/Unix: @@ -63,7 +64,7 @@ To install ibm_db from source code after clone from git, or to know the detialed ## Installation -* 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. +* 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. You can install the driver using pip as: @@ -191,8 +192,7 @@ conda install -c conda-forge ibm_db ## Quick Example ```python $ python -Python 3.6.5 (default, May 10 2018, 00:54:55) -[GCC 4.3.4 [gcc-4_3-branch revision 152973]] on linux +Python 3.13.0 (main, Oct 7 2024, 05:02:14) [Clang 16.0.0 (clang-1600.0.26.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import ibm_db >>> #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 |AIX | ppc |aix32_odbc_cli.tar.gz | Yes | V11.5.9 | | | others |aix64_odbc_cli.tar.gz | Yes | V11.5.9 | |Darwin | x64 |macos64_odbc_cli.tar.gz | Yes | Till V11.5.9 | - | arm64 |macarm64_odbc_cli.tar.gz | Yes | From V12.1.0 | +| | arm64 |macarm64_odbc_cli.tar.gz | Yes | From V12.1.0 | |Linux | x64 |linuxx64_odbc_cli.tar.gz | Yes | V11.5.9 | | | s390x |s390x64_odbc_cli.tar.gz | Yes | V11.5.9 | | | s390 |s390_odbc_cli.tar.gz | Yes | V11.1 | diff --git a/pyproject.toml b/pyproject.toml index 3e154a32..1d64a68b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = ["setuptools"] build-backend = "setuptools.build_meta" -[tool.cibuildwheel.macos] +[tool.cibuildwheel.macos] repair-wheel-command = "delocate-wheel --ignore-missing-dependencies --require-archs {delocate_archs} -w {dest_dir} -v {wheel}" -skip = "cp36-macosx_x86_64" +skip = "cp36-* pp*"