Skip to content
Snippets Groups Projects
setup.py 1.91 KiB
Newer Older
  • Learn to ignore specific revisions
  • import os
    
    Stuart Gathman's avatar
    Stuart Gathman committed
    import sys
    
    from distutils.core import setup, Extension
    
    
    Stuart Gathman's avatar
    Stuart Gathman committed
    if sys.version < '2.6.5':
      sys.exit('ERROR: Sorry, python 2.6.5 is required for this module.')
    
    
    Stuart Gathman's avatar
    Stuart Gathman committed
    # FIXME: on some versions of sendmail, smutil is renamed to sm.
    # On slackware and debian, leave it out entirely.  It depends
    
    Stuart Gathman's avatar
    Stuart Gathman committed
    # on how libmilter was built by the sendmail package.
    
    Stuart Gathman's avatar
    Stuart Gathman committed
    #libs = ["milter", "smutil"]
    libs = ["milter"]
    
    libdirs = ["/usr/lib/libmilter"]    # needed for Debian
    
    modules = ["mime"]
    
    Stuart Gathman's avatar
    Stuart Gathman committed
    # NOTE: importing Milter to obtain version fails when milter.so not built
    
    Stuart D. Gathman's avatar
    Stuart D. Gathman committed
    setup(name = "pymilter", version = '1.0.4',
    
    	description="Python interface to sendmail milter API",
    	long_description="""\
    This is a python extension module to enable python scripts to
    attach to sendmail's libmilter functionality.  Additional python
    modules provide for navigating and modifying MIME parts, and
    
    Stuart Gathman's avatar
    Stuart Gathman committed
    sending DSNs or doing CBVs.
    
    """,
    	author="Jim Niemira",
    	author_email="urmane@urmane.org",
    	maintainer="Stuart D. Gathman",
    
    	maintainer_email="stuart@gathman.org",
    
    	license="GPL",
    
    	url="https://www.pymilter.org/",
    
    	py_modules=modules,
    
    Stuart Gathman's avatar
    Stuart Gathman committed
    	packages = ['Milter'],
    
    	ext_modules=[
    
    Stuart Gathman's avatar
    Stuart Gathman committed
    	  Extension("milter", ["miltermodule.c"],
    
                library_dirs=libdirs,
    
    Stuart Gathman's avatar
    Stuart Gathman committed
    	    libraries=libs,
    
    Stuart Gathman's avatar
    Stuart Gathman committed
    	    # set MAX_ML_REPLY to 1 for sendmail < 8.13
    
    	    define_macros = [ ('MAX_ML_REPLY',32) ],
                # save lots of debugging time testing rfc2553 compliance
                extra_compile_args = [ "-Werror=implicit-function-declaration" ]
    
    Stuart Gathman's avatar
    Stuart Gathman committed
    	  ),
    
    	],
    	keywords = ['sendmail','milter'],
    	classifiers = [
    	  'Development Status :: 5 - Production/Stable',
    	  'Environment :: No Input/Output (Daemon)',
    	  'Intended Audience :: System Administrators',
    	  'License :: OSI Approved :: GNU General Public License (GPL)',
    	  'Natural Language :: English',
    	  'Operating System :: POSIX',
    	  'Programming Language :: Python',
    
    Stuart Gathman's avatar
    Stuart Gathman committed
    	  'Topic :: Communications :: Email :: Mail Transport Agents',
    	  'Topic :: Communications :: Email :: Filters'