Ticket #27768: setup.py

File setup.py, 778 bytes (added by singingwolfboy@…, 14 years ago)

setup.py for py27-tkinter Portfile

Line 
1import os, string
2
3try:
4    import distutils
5    from distutils import sysconfig
6    from distutils.command.install import install
7    from distutils.core import setup, Extension
8except:
9    raise SystemExit, "Distutils problem"
10
11tkversion = "__TK-VERSION__"
12prefix = "__PREFIX__"
13inc_dirs = [prefix + "/include"]
14lib_dirs = [prefix + "/lib"]
15libs = ["tcl" + tkversion, "tk" + tkversion]
16
17setup(name = "Tkinter",
18      description = "Tk Extension to Python",
19     
20      ext_modules = [Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'],
21                               define_macros=[('WITH_APPINIT', 1)],
22                               include_dirs = inc_dirs,
23                               libraries = libs,
24                               library_dirs = lib_dirs)]
25      )