Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7d01a1e

Browse files
committed
add proper dependencies on expat headers and sources
2 parents 5d50ade + d489c7a commit 7d01a1e

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
@@ -1394,6 +1394,7 @@ class db_found(Exception): pass
13941394
define_macros = []
13951395
expat_lib = ['expat']
13961396
expat_sources = []
1397+
expat_depends = []
13971398
else:
13981399
expat_inc = [os.path.join(os.getcwd(), srcdir, 'Modules', 'expat')]
13991400
define_macros = [
@@ -1403,12 +1404,25 @@ class db_found(Exception): pass
14031404
expat_sources = ['expat/xmlparse.c',
14041405
'expat/xmlrole.c',
14051406
'expat/xmltok.c']
1407+
expat_depends = ['expat/ascii.h',
1408+
'expat/asciitab.h',
1409+
'expat/expat.h',
1410+
'expat/expat_config.h',
1411+
'expat/expat_external.h',
1412+
'expat/internal.h',
1413+
'expat/latin1tab.h',
1414+
'expat/utf8tab.h',
1415+
'expat/xmlrole.h',
1416+
'expat/xmltok.h',
1417+
'expat/xmltok_impl.h'
1418+
]
14061419

14071420
exts.append(Extension('pyexpat',
14081421
define_macros = define_macros,
14091422
include_dirs = expat_inc,
14101423
libraries = expat_lib,
1411-
sources = ['pyexpat.c'] + expat_sources
1424+
sources = ['pyexpat.c'] + expat_sources,
1425+
depends = expat_depends,
14121426
))
14131427

14141428
# Fredrik Lundh's cElementTree module. Note that this also
@@ -1421,6 +1435,8 @@ class db_found(Exception): pass
14211435
include_dirs = expat_inc,
14221436
libraries = expat_lib,
14231437
sources = ['_elementtree.c'],
1438+
depends = ['pyexpat.c'] + expat_sources +
1439+
expat_depends,
14241440
))
14251441
else:
14261442
missing.append('_elementtree')

0 commit comments

Comments
 (0)