from setuptools import setup, Extension

long_description = '''
Version of the chm package modified to support Python 3 and bundled with Recoll.
The chm package provides two modules, chm, and chmlib, which provide
access to the API implemented by the C library chmlib and some additional
classes and functions. They are used to access MS-ITSS encoded files -
Compressed Html Help files (.chm).
'''

# For shadow builds: references to the source tree
import os
srcdir = '@srcdir@'

# See setup.cfg.in
if not os.path.exists('recollchm.egg-info'):
   os.mkdir('recollchm.egg-info')
   
setup(name="recollchm",
      version="0.8.4.1+git",
      description="Python package to handle CHM files",
      author="Rubens Ramos",
      author_email="rubensr@users.sourceforge.net",
      maintainer="Mikhail Gusarov",
      maintainer_email="dottedmag@dottedmag.net",
      url="https://github.com/dottedmag/pychm",
      license="GPL",
      long_description=long_description,
      package_dir = {'' : srcdir},
      py_modules=["recollchm.chm", "recollchm.chmlib"],
      ext_modules=[Extension("recollchm._chmlib",
                             [os.path.join(srcdir, "recollchm/swig_chm.c")],
                             libraries=["chm"],
                             extra_compile_args=["-DSWIG_COBJECT_TYPES"]),]
      )
