aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python/pyconfig.inc
blob: b513b1880b09e95e198a0f36382b4783085b7342 (plain) (blame)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
NO_COMPILER_WARNINGS()

ENABLE(USE_ARCADIA_PYTHON)

SET(PYTHON_DIR "contrib/tools/python")
SET(PYTHON_SRC_DIR "${PYTHON_DIR}/src")

SET(PYTHON_ROOT "${ARCADIA_ROOT}/${PYTHON_DIR}")
SET(PYTHON_SRC_ROOT "${ARCADIA_ROOT}/${PYTHON_SRC_DIR}")

SET(PYTHON_FLAGS "-DPy_BUILD_CORE")

ADDINCL(${PYTHON_SRC_DIR}/Include) 
 
CFLAGS(
    -DUNQUOTED_VERSION=2.7
)

IF (NOT WIN32)
    EXTRALIBS(-lutil)

    IF (LINUX)
        EXTRALIBS(-ldl)

        CFLAGS(
            -DUNQUOTED_PYTHONPATH=:plat-linux2
            -DUNQUOTED_PLATFORM=linux2
        )
    ELSEIF (FREEBSD)
        CFLAGS(
            -DUNQUOTED_PYTHONPATH=:plat-freebsd${FREEBSD_VER}
            -DUNQUOTED_PLATFORM=freebsd${FREEBSD_VER}
        )
    ELSEIF (DARWIN)
        CFLAGS(
            -DUNQUOTED_PYTHONPATH=:plat-darwin
            -DUNQUOTED_PLATFORM=darwin
        )
        LDFLAGS(
           -framework SystemConfiguration
           -framework CoreFoundation
        )
    ENDIF ()
ENDIF ()

IF (MSVC)
    CFLAGS(/DXMLCALL= /DXMLIMPORT=)
ENDIF ()