summaryrefslogtreecommitdiff
path: root/x11-toolkits/py-tkinter/files/setup.py.in
blob: fbf905a2e27a5fad802d677e9c41129bee342b51 (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
#!/usr/bin/env python

import sys
import sysconfig
from setuptools import setup, Extension

tkversion = "%%TK_VER%%"
prefix = sysconfig.get_config_var('prefix')
x11base = sys.prefix or '/usr/X11R6'
inc_dirs = [sysconfig.get_path('include') + "/internal",
            prefix + "/include/tcl" + tkversion,
            prefix + "/include/tk" + tkversion,
            x11base + "/include"]
lib_dirs = [x11base + "/lib"]
libs = ["tcl" + tkversion.replace(".", ""),
        "tk" + tkversion.replace(".", ""),
        "X11"]
macros = [('Py_BUILD_CORE_MODULE', 1), ('WITH_APPINIT', 1)]

setup(ext_modules = [Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'],
                               define_macros=macros,
                               include_dirs = inc_dirs,
                               libraries = libs,
                               library_dirs = lib_dirs)]
      )