Skip to content

Commit

Permalink
Fix an issue where the wheel package is not getting installed on the …
Browse files Browse the repository at this point in the history
…arm64-based macOS version < 14. pgadmin-org#7754
  • Loading branch information
khushboovashi committed Aug 5, 2024
1 parent 52af8d3 commit 7be6777
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions pkg/pip/setup_pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,15 @@ def load_source(name, path):
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)
Expand Down

0 comments on commit 7be6777

Please sign in to comment.