mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
add proper dependencies on expat headers and sources
This commit is contained in:
commit
633a92ff20
1 changed files with 17 additions and 1 deletions
18
setup.py
18
setup.py
|
@ -1405,6 +1405,7 @@ class PyBuildExt(build_ext):
|
||||||
define_macros = []
|
define_macros = []
|
||||||
expat_lib = ['expat']
|
expat_lib = ['expat']
|
||||||
expat_sources = []
|
expat_sources = []
|
||||||
|
expat_depends = []
|
||||||
else:
|
else:
|
||||||
expat_inc = [os.path.join(os.getcwd(), srcdir, 'Modules', 'expat')]
|
expat_inc = [os.path.join(os.getcwd(), srcdir, 'Modules', 'expat')]
|
||||||
define_macros = [
|
define_macros = [
|
||||||
|
@ -1414,12 +1415,25 @@ class PyBuildExt(build_ext):
|
||||||
expat_sources = ['expat/xmlparse.c',
|
expat_sources = ['expat/xmlparse.c',
|
||||||
'expat/xmlrole.c',
|
'expat/xmlrole.c',
|
||||||
'expat/xmltok.c']
|
'expat/xmltok.c']
|
||||||
|
expat_depends = ['expat/ascii.h',
|
||||||
|
'expat/asciitab.h',
|
||||||
|
'expat/expat.h',
|
||||||
|
'expat/expat_config.h',
|
||||||
|
'expat/expat_external.h',
|
||||||
|
'expat/internal.h',
|
||||||
|
'expat/latin1tab.h',
|
||||||
|
'expat/utf8tab.h',
|
||||||
|
'expat/xmlrole.h',
|
||||||
|
'expat/xmltok.h',
|
||||||
|
'expat/xmltok_impl.h'
|
||||||
|
]
|
||||||
|
|
||||||
exts.append(Extension('pyexpat',
|
exts.append(Extension('pyexpat',
|
||||||
define_macros = define_macros,
|
define_macros = define_macros,
|
||||||
include_dirs = expat_inc,
|
include_dirs = expat_inc,
|
||||||
libraries = expat_lib,
|
libraries = expat_lib,
|
||||||
sources = ['pyexpat.c'] + expat_sources
|
sources = ['pyexpat.c'] + expat_sources,
|
||||||
|
depends = expat_depends,
|
||||||
))
|
))
|
||||||
|
|
||||||
# Fredrik Lundh's cElementTree module. Note that this also
|
# Fredrik Lundh's cElementTree module. Note that this also
|
||||||
|
@ -1432,6 +1446,8 @@ class PyBuildExt(build_ext):
|
||||||
include_dirs = expat_inc,
|
include_dirs = expat_inc,
|
||||||
libraries = expat_lib,
|
libraries = expat_lib,
|
||||||
sources = ['_elementtree.c'],
|
sources = ['_elementtree.c'],
|
||||||
|
depends = ['pyexpat.c'] + expat_sources +
|
||||||
|
expat_depends,
|
||||||
))
|
))
|
||||||
else:
|
else:
|
||||||
missing.append('_elementtree')
|
missing.append('_elementtree')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue