databases/py-gdbm: fix build with Python 3.12+
Certain internal headers are included unconditionally starting with Python 3.12, but this should have been built with the appropriate preprocessor macros for internal headers set anyway. PR: 286298 Event: Kitchener-Waterloo Hackathon 202506
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
PORTNAME= gdbm
|
||||
DISTVERSION= ${PYTHON_DISTVERSION}
|
||||
PORTREVISION= 9
|
||||
PORTREVISION= 10
|
||||
CATEGORIES= databases python
|
||||
MASTER_SITES= PYTHON/ftp/python/${DISTVERSION}
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
||||
@@ -4,12 +4,15 @@ import sysconfig
|
||||
from setuptools import setup, Extension
|
||||
|
||||
prefix = sysconfig.get_config_var('prefix')
|
||||
inc_dirs = [prefix + "/include"]
|
||||
inc_dirs = [sysconfig.get_path('include') + "/internal",
|
||||
prefix + "/include"]
|
||||
lib_dirs = [prefix + "/lib"]
|
||||
libs = ["gdbm"]
|
||||
macros = [('Py_BUILD_CORE_MODULE', 1)]
|
||||
|
||||
setup(ext_modules = [Extension('_gdbm', ['_gdbmmodule.c'],
|
||||
include_dirs = inc_dirs,
|
||||
libraries = libs,
|
||||
library_dirs = lib_dirs)]
|
||||
library_dirs = lib_dirs,
|
||||
define_macros = macros)]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user