Fix an issue where the wheel package is not getting installed on the arm64-based macOS version < 14. #7754

This commit is contained in:
Khushboo Vashi 2024-08-05 12:31:28 +05:30 committed by GitHub
parent 52af8d3e49
commit b4e4b9d498
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,11 +43,15 @@ for index, req in enumerate(all_requires):
if 'psycopg[c]' in req:
# Starting from Psycopg 3.1.20, ARM64 macOS binary packages are no
# longer available for macOS versions before 14.0.
if platform.system() == 'Darwin' and 'arm' in platform.processor()\
and platform.mac_ver()[0] < '14.0':
req = 'psycopg[binary]==3.1.19'
else:
req = req.replace('psycopg[c]', 'psycopg[binary]')
_req = req.replace('psycopg[c]', 'psycopg[binary]')
req = "psycopg[binary] == 3.1.19; sys_platform == 'darwin' and" \
" platform_machine == 'arm64' and platform_release < '23.0' \n"\
+ _req + "; (sys_platform == 'darwin' and" \
" platform_machine == 'arm64' and" \
" platform_release >= '23.0') or" \
" (sys_platform == 'darwin' and" \
" platform_machine != 'arm64'" \
") or sys_platform != 'darwin'"
if 'gssapi' in req:
kerberos_extras.append(req)