#!@PYTHON@

"""
setup.py file for OpenPACE wrapper
"""
from distutils.core import setup, Extension
import shlex

#The following variables are set by autotools at build-time
OPENPACE_LIBS = '@OPENPACE_LIBS@'
OPENPACE_CFLAGS = '@OPENPACE_CFLAGS@'
CRYPTO_LIBS = '@CRYPTO_LIBS@'
CRYPTO_CFLAGS = '@CRYPTO_CFLAGS@'
CFLAGS = '@CFLAGS@'
CPPFLAGS = '@CPPFLAGS@'
LIBS = '@LIBS@'

all_libs = shlex.split(LIBS + ' ' + OPENPACE_LIBS + ' ' + CRYPTO_LIBS)
all_cflags = shlex.split(CPPFLAGS + ' ' + CFLAGS + ' ' + OPENPACE_CFLAGS + ' ' + CRYPTO_CFLAGS)

#Prepare the external module that we want to build
eac_module = Extension('_eac',
                           sources=['eac.i'],
                           swig_opts=['-modern', '-outdir', '@builddir@', '-I@srcdir@/..'],
                           extra_compile_args=all_cflags,
                           extra_link_args=all_libs,
                          )

#Setup Distutils
setup (name         = '@PACKAGE_NAME@',
       version      = '@PACKAGE_VERSION@',
       author       = "Dominik Oepen",
       author_email = "oepen@informatik.hu-berlin.de",
       url          = "@PACKAGE_URL@",
       description  = """Python wrapper for @PACKAGE_NAME@""",
       classifiers  = [ 'Intended Audience :: Developers',
                        'Operating System :: POSIX',
                        'License :: OSI Approved :: GNU General Public License (GPL)',
                        'Operating System :: POSIX :: Linux',
                      ],
       ext_modules  = [eac_module],
       py_modules   = ['eac', 'chat', 'pace_entity'],
      )
