
# $Id: setup.py.in,v 1.5 2003/07/24 17:46:09 grisha Exp $

APXS = r"@APXS@"
VER = "@MP_VERSION@"

from distutils.core import setup, Extension

import sys

if len(sys.argv) > 1 and sys.argv[1] == "bdist_wininst":
    moddir = ""
#    mpso = "mod_python.so"

    setup(name="mod_python",
          version=VER,
          description="Apache/Python Integration",
          author="Gregory Trubetskoy et al",
          author_email="mod_python@modpython.org",
          url="http://www.modpython.org/",
          packages=["mod_python"],
          package_dir = {"mod_python":"../lib/python/mod_python"},
          scripts=["win32_postinstall.py"],
          data_files=[(moddir, ["mod_python.so"])])

else:
#    import commands
#    moddir = commands.getoutput("%s -q LIBEXECDIR" % APXS)
#    mpso = "../src/mod_python.so"

    setup(name="mod_python",
          version=VER,
          description="Apache/Python Integration",
          author="Gregory Trubetskoy et al",
          author_email="mod_python@modpython.org",
          url="http://www.modpython.org/",
          packages=["mod_python"],
          ext_modules=[Extension("mod_python._psp",
                                 ["src/psp_string.c",
                                  "src/psp_parser.c",
                                  "src/_pspmodule.c"],
                                 include_dirs=["src/include"]
                                 )
                       ]
          )
          


# makes emacs go into python mode
### Local Variables:
### mode:python
### End:
