Skip to content

Commit

Permalink
Psycopg binary packages are now available for macOS version < 14.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
Suall1969 authored Jan 20, 2025
1 parent 90eff9a commit 74e776b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
13 changes: 1 addition & 12 deletions pkg/pip/setup_pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import builtins
import os
import sys
import platform
from codecs import open
from importlib.machinery import SourceFileLoader

Expand Down Expand Up @@ -41,17 +40,7 @@ def load_source(name, path):
# gssapi in it's own list
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.
_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'"
req = req.replace('psycopg[c]', 'psycopg[binary]')

if 'gssapi' in req:
kerberos_extras.append(req)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pytz==2024.*
speaklater3==1.*
sqlparse==0.*
psutil==6.1.*
psycopg[c]==3.2.3
psycopg[c]==3.2.4
python-dateutil==2.*
SQLAlchemy==2.*
bcrypt==4.2.*
Expand Down

0 comments on commit 74e776b

Please sign in to comment.