Commits
Marcus Calhoun-Lopez authored 76607a41fba
1 + | --- setup.py.orig 2014-10-16 00:35:21.000000000 -0700 |
2 + | +++ setup.py 2014-10-20 21:44:57.000000000 -0700 |
3 + | |
4 + | # - iconv.h |
5 + | # - libxslt/xsltconfig.h |
6 + | includes_dir = [ |
7 + | -"/usr/include", |
8 + | -"/usr/local/include", |
9 + | -"/opt/include", |
10 + | -os.path.join(ROOT,'include'), |
11 + | -HOME |
12 + | +"@PREFIX@/include", |
13 + | ]; |
14 + | |
15 + | xml_includes="" |
16 + | |
17 + | |
18 + | # those are added in the linker search path for libraries |
19 + | libdirs = [ |
20 + | -os.path.join(ROOT,'lib'), |
21 + | +"@PREFIX@/lib" |
22 + | ] |
23 + | |
24 + | xml_files = ["libxml2-api.xml", "libxml2-python-api.xml", |
25 + | |
26 + | result.close() |
27 + | |
28 + | with_xslt=0 |
29 + | -if missing("libxslt-py.c") or missing("libxslt.py"): |
30 + | - if missing("xsltgenerator.py") or missing("libxslt-api.xml"): |
31 + | - print("libxslt stub generator not found, libxslt not built") |
32 + | - else: |
33 + | - try: |
34 + | - import xsltgenerator |
35 + | - except: |
36 + | - print("failed to generate stubs for libxslt, aborting ...") |
37 + | - print(sys.exc_info()[0], sys.exc_info()[1]) |
38 + | - else: |
39 + | - head = open("libxsl.py", "r") |
40 + | - generated = open("libxsltclass.py", "r") |
41 + | - result = open("libxslt.py", "w") |
42 + | - for line in head.readlines(): |
43 + | - if WITHDLLS: |
44 + | - result.write(altImport(line)) |
45 + | - else: |
46 + | - result.write(line) |
47 + | - for line in generated.readlines(): |
48 + | - result.write(line) |
49 + | - head.close() |
50 + | - generated.close() |
51 + | - result.close() |
52 + | - with_xslt=1 |
53 + | -else: |
54 + | - with_xslt=1 |
55 + | |
56 + | if with_xslt == 1: |
57 + | xslt_includes="" |