Psycopg binary packages are now available for macOS version < 14.0.

This commit is contained in:
Suall1969
2025-01-20 15:27:08 +03:30
committed by GitHub
parent 90eff9a596
commit 74e776ba21
2 changed files with 2 additions and 13 deletions

View File

@@ -10,7 +10,6 @@
import builtins import builtins
import os import os
import sys import sys
import platform
from codecs import open from codecs import open
from importlib.machinery import SourceFileLoader from importlib.machinery import SourceFileLoader
@@ -41,17 +40,7 @@ kerberos_extras = []
# gssapi in it's own list # gssapi in it's own list
for index, req in enumerate(all_requires): for index, req in enumerate(all_requires):
if 'psycopg[c]' in req: if 'psycopg[c]' in req:
# Starting from Psycopg 3.1.20, ARM64 macOS binary packages are no req = req.replace('psycopg[c]', 'psycopg[binary]')
# 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'"
if 'gssapi' in req: if 'gssapi' in req:
kerberos_extras.append(req) kerberos_extras.append(req)

View File

@@ -28,7 +28,7 @@ pytz==2024.*
speaklater3==1.* speaklater3==1.*
sqlparse==0.* sqlparse==0.*
psutil==6.1.* psutil==6.1.*
psycopg[c]==3.2.3 psycopg[c]==3.2.4
python-dateutil==2.* python-dateutil==2.*
SQLAlchemy==2.* SQLAlchemy==2.*
bcrypt==4.2.* bcrypt==4.2.*