Skip to content

Commit 03e2180

Browse files
committed
Issue #15560: Fix building _sqlite3 extension on OS X with an SDK.
1 parent e768c39 commit 03e2180

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,8 @@ Tests
440440
Build
441441
-----
442442

443+
- Issue #15560: Fix building _sqlite3 extension on OS X with an SDK.
444+
443445
- Issue #8847: Disable COMDAT folding in Windows PGO builds.
444446

445447
- Issue #14197: For OS X framework builds, ensure links to the shared

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -981,12 +981,12 @@ class db_found(Exception): pass
981981
if sys.platform == 'darwin':
982982
sysroot = macosx_sdk_root()
983983

984-
for d in inc_dirs + sqlite_inc_paths:
985-
f = os.path.join(d, "sqlite3.h")
986-
984+
for d_ in inc_dirs + sqlite_inc_paths:
985+
d = d_
987986
if sys.platform == 'darwin' and is_macosx_sdk_path(d):
988-
f = os.path.join(sysroot, d[1:], "sqlite3.h")
987+
d = os.path.join(sysroot, d[1:])
989988

989+
f = os.path.join(d, "sqlite3.h")
990990
if os.path.exists(f):
991991
if sqlite_setup_debug: print("sqlite: found %s"%f)
992992
with open(f) as file:

0 commit comments

Comments
 (0)