mirror of
https://github.com/python/cpython.git
synced 2025-08-01 23:53:15 +00:00
Compute expat -I directives from srcdir. Fixes #517214.
This commit is contained in:
parent
b012a15c42
commit
8301256a44
1 changed files with 3 additions and 1 deletions
4
setup.py
4
setup.py
|
@ -224,6 +224,7 @@ class PyBuildExt(build_ext):
|
||||||
exts = []
|
exts = []
|
||||||
|
|
||||||
platform = self.get_platform()
|
platform = self.get_platform()
|
||||||
|
(srcdir,) = sysconfig.get_config_vars('srcdir')
|
||||||
|
|
||||||
# Check for MacOS X, which doesn't need libm.a at all
|
# Check for MacOS X, which doesn't need libm.a at all
|
||||||
math_libs = ['m']
|
math_libs = ['m']
|
||||||
|
@ -558,6 +559,7 @@ class PyBuildExt(build_ext):
|
||||||
xmlbo = "12"
|
xmlbo = "12"
|
||||||
else:
|
else:
|
||||||
xmlbo = "21"
|
xmlbo = "21"
|
||||||
|
expatinc = os.path.join(os.getcwd(), srcdir, 'Modules', 'expat')
|
||||||
exts.append(Extension('pyexpat',
|
exts.append(Extension('pyexpat',
|
||||||
sources = [
|
sources = [
|
||||||
'pyexpat.c',
|
'pyexpat.c',
|
||||||
|
@ -572,7 +574,7 @@ class PyBuildExt(build_ext):
|
||||||
('XML_BYTE_ORDER', xmlbo),
|
('XML_BYTE_ORDER', xmlbo),
|
||||||
('XML_CONTEXT_BYTES','1024'),
|
('XML_CONTEXT_BYTES','1024'),
|
||||||
],
|
],
|
||||||
include_dirs = ['Modules/expat']
|
include_dirs = [expatinc]
|
||||||
))
|
))
|
||||||
|
|
||||||
# Dynamic loading module
|
# Dynamic loading module
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue