aboutsummaryrefslogtreecommitdiff
blob: 3ffdae26e56ad0f2fdbe81f9fb1165a716dbe1b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--- setup.py
+++ setup.py
@@ -1326,18 +1326,15 @@
         #
         # More information on Expat can be found at www.libexpat.org.
         #
-        expatinc = os.path.join(os.getcwd(), srcdir, 'Modules', 'expat')
-        define_macros = [
-            ('HAVE_EXPAT_CONFIG_H', '1'),
-        ]
+        # Use system expat
+        expatinc = '/usr/include'
+        define_macros = []
 
         exts.append(Extension('pyexpat',
                               define_macros = define_macros,
                               include_dirs = [expatinc],
+                              libraries = ['expat'],
                               sources = ['pyexpat.c',
-                                         'expat/xmlparse.c',
-                                         'expat/xmlrole.c',
-                                         'expat/xmltok.c',
                                          ],
                               ))
 
@@ -1349,6 +1346,7 @@
             exts.append(Extension('_elementtree',
                                   define_macros = define_macros,
                                   include_dirs = [expatinc],
+                                  libraries = ['expat'],
                                   sources = ['_elementtree.c'],
                                   ))
         else: