summaryrefslogtreecommitdiff
path: root/src/lxml/__init__.py
blob: 8f33dcd5f2f47fdc7e8c7be030d144d8241a5063 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# this is a package

import os

def get_include():
    """
    Returns a list of header include paths (for lxml itself, libxml2
    and libxslt) needed to compile C code against lxml if it was built
    with statically linked libraries.
    """
    lxml_path = __path__[0]
    include_path = os.path.join(lxml_path, 'include')
    includes = [include_path, lxml_path]

    for name in os.listdir(include_path):
        path = os.path.join(include_path, name)
        if os.path.isdir(path):
            includes.append(path)

    return includes