Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/bld_wheels_and_upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:
push:
branches:
- master
- '*'
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
Expand Down Expand Up @@ -70,11 +70,15 @@ jobs:
uses: pypa/cibuildwheel@v3.4.1
env:
CIBW_ARCHS_LINUX: "x86_64 i686"
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
# clidriver v12.1 needs glibc >= 2.34 and CPUs supporting the x86_64-v2
# instruction set (see https://github.com/pypa/manylinux/issues/1725),
# so manylinux2014 (glibc 2.17) can no longer be used here.
CIBW_MANYLINUX_I686_IMAGE: manylinux_2_34
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_34
CIBW_SKIP: "cp38-* *t-* *-musllinux_* *-*linux_{aarch64,ppc64le}"
CIBW_REPAIR_WHEEL_COMMAND_LINUX:
auditwheel repair
--disable-isa-ext-check
--exclude libdb2.so.1
--exclude libDB2xml4c.so.58
--exclude libm.so.6
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ If you face problems due to missing python header files while installing the dri

If you have installed `DB2_RTC*` i.e. **DB2 Runtime Client** and want `ibm_db` to use it instead of clidriver, please read [this comment](https://github.com/ibmdb/python-ibmdb/issues/1023#issuecomment-3062805368) and take action.

- clidriver v12.1 on Linux uses x86_64_v2 instruction set which is not supported by cibuildwheel and wheel image creation [fails](https://github.com/pypa/manylinux/issues/1725) using v12.1 clidriver. So, default version of clidriver on Linux platform is v11.5.9 only.
- clidriver v12.1 on Linux requires glibc >= 2.34 and a CPU supporting the x86_64-v2 instruction set (e.g. Ubuntu 21.10+, RHEL 9+, Debian 12+, Fedora 35+ on hardware from 2009 onwards). Official Linux wheels on PyPI are now built with v12.1 clidriver using the `manylinux_2_34` image (see [pypa/manylinux#1725](https://github.com/pypa/manylinux/issues/1725) for background).

- You can force installation of ibm_db on Linux with clidriver v12.1 using below commands:
- If your system does not meet the glibc/CPU requirement above, install ibm_db from source with the older v11.5.9 clidriver instead:

```
export CLIDRIVER_VERSION=v12.1.0
export CLIDRIVER_VERSION=v11.5.9
pip install ibm_db --no-binary :all: --no-cache-dir
```

Expand Down Expand Up @@ -477,7 +477,7 @@ conn = ibm_db.connect(connStr,'','')

- For MacOSx64(Intel processor) and Linuxx64, **db2connect license of version 11.5** is required.

- clidriver v12.1 on Linux uses x86_64_v2 instruction set which is not supported by `cibuildwheel` and wheel image creation [fails](https://github.com/pypa/manylinux/issues/1725) using v12.1 clidriver. So, default version of clidriver on Linux platform is v11.5.9 only.
- clidriver v12.1 on Linux requires glibc >= 2.34 and a CPU supporting the x86_64-v2 instruction set (see [pypa/manylinux#1725](https://github.com/pypa/manylinux/issues/1725) for background). Official Linux wheels on PyPI are built with v12.1 clidriver using the `manylinux_2_34` image.

- For activating server side license, you can purchase either `Db2 Connect Unlimited Edition for System z®` or `Db2 Connect Unlimited Edition for System i®` license from IBM.

Expand Down
1 change: 1 addition & 0 deletions ibm_db.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <datetime.h>
#include "ibm_db.h"
#include <ctype.h>
#include <wctype.h>
#ifdef _WIN32
#include <windows.h>
#else
Expand Down
10 changes: 3 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,7 @@ def print_exception( e, url):
prebuildIbmdbPYD = True

# Get version of clidriver for autodownload from environment variable CLIDRIVER_VERSION
# Default version is v12.1.0 for non-linux platform.
clidriver_version = os.getenv("CLIDRIVER_VERSION", "v12.1.0")

# Default version is v11.5.9 for linux. clidriver v12.1.0 for linux uses x86_64_V2 instruction set which is not supported by cibuildwheel
if ('linux' == sys.platform):
clidriver_version = os.getenv("CLIDRIVER_VERSION", "v11.5.9")
clidriver_version = os.getenv("CLIDRIVER_VERSION", "")

if ((ibm_db_home == '') and (ibm_db_dir == '') and (ibm_db_lib == '')):
if('win32' not in sys.platform):
Expand Down Expand Up @@ -383,7 +378,8 @@ def print_exception( e, url):
ibm_db_lib_runtime = os.path.join('$ORIGIN', 'clidriver', 'lib')
ibm_db_dir = 'clidriver'
ibm_db_lib = os.path.join(ibm_db_dir, 'lib')
clidriver_version = clidriver_version + "/"
if(clidriver_version and not clidriver_version.endswith("/")):
clidriver_version = clidriver_version + "/"

if not os.path.isdir('clidriver'):
if 'IBM_DB_INSTALLER_URL' in os.environ:
Expand Down