Source

python-axonbinaryfile / setup.py

from distutils.core import setup, Extension
# need to:
#   install binary if on windows
#   install scripts
#   install library for reading text and metadata files

import numpy, os.path
SETUPDIR = os.path.dirname(__file__)
numpy_dir = os.path.dirname(numpy.__file__)
abf_ext = Extension("_abf",
    sources=["axonbinaryfile/_abfmodule.cpp"],
                    language="c++",
    include_dirs = [r"include", os.path.join(numpy_dir,r'core/include')],
                    library_dirs=[os.path.join(SETUPDIR, 'lib/FSP_ABF2_0_1_4R')],
                    libraries=['ABFFIO'],
    )

    

setup(
    name='axonbinaryfiles',
    description="""a package to allow reading of axon binary files "abf" generated by pClamp 9 and 10 into python""",
    version="1.0pre2nodocs",
    packages=['axonbinaryfile','axonbinaryfile.utils'],
#    data_files = {'axonbinaryfile':['lib/FSP_ABF2_0_1_4R/ABFFIO.dll']},
    package_data= {'axonbinaryfile':['ABFFIO.dll']},
    # may try double install of dll
    scripts=['scripts/abfconvert.py',
             'lib/FSP_ABF2_0_1_4R/ABFFIO.dll', # a hack to see how to get this packaged up
             'bin/abf2txt.exe', 
             ],
    ext_modules = [abf_ext],
    classifiers = [
        'Development Status :: alpha',
        'Operating System :: Microsoft :: Windows'
        'Topic :: Science',
        'Intended Audience :: End Users/Desktop',
        ],
)