Skip to content

Commit 633a92f

Browse files
committed
add proper dependencies on expat headers and sources
2 parents fde43ec + 7d01a1e commit 633a92f

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

‎setup.py‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1405,6 +1405,7 @@ class db_found(Exception): pass
14051405
define_macros = []
14061406
expat_lib = ['expat']
14071407
expat_sources = []
1408+
expat_depends = []
14081409
else:
14091410
expat_inc = [os.path.join(os.getcwd(), srcdir, 'Modules', 'expat')]
14101411
define_macros = [
@@ -1414,12 +1415,25 @@ class db_found(Exception): pass
14141415
expat_sources = ['expat/xmlparse.c',
14151416
'expat/xmlrole.c',
14161417
'expat/xmltok.c']
1418+
expat_depends = ['expat/ascii.h',
1419+
'expat/asciitab.h',
1420+
'expat/expat.h',
1421+
'expat/expat_config.h',
1422+
'expat/expat_external.h',
1423+
'expat/internal.h',
1424+
'expat/latin1tab.h',
1425+
'expat/utf8tab.h',
1426+
'expat/xmlrole.h',
1427+
'expat/xmltok.h',
1428+
'expat/xmltok_impl.h'
1429+
]
14171430

14181431
exts.append(Extension('pyexpat',
14191432
define_macros = define_macros,
14201433
include_dirs = expat_inc,
14211434
libraries = expat_lib,
1422-
sources = ['pyexpat.c'] + expat_sources
1435+
sources = ['pyexpat.c'] + expat_sources,
1436+
depends = expat_depends,
14231437
))
14241438

14251439
# Fredrik Lundh's cElementTree module. Note that this also
@@ -1432,6 +1446,8 @@ class db_found(Exception): pass
14321446
include_dirs = expat_inc,
14331447
libraries = expat_lib,
14341448
sources = ['_elementtree.c'],
1449+
depends = ['pyexpat.c'] + expat_sources +
1450+
expat_depends,
14351451
))
14361452
else:
14371453
missing.append('_elementtree')

0 commit comments

Comments
 (0)