if HAVE_PYTHON
pyexec_LTLIBRARIES = _comedi.la
clean-local:
- $(RM) comedi_wrap.c comedi.py
+ $(RM) comedi_python_wrap.c comedi.py
else
pyexec_LTLIBRARIES =
clean-local:
endif
-nodist__comedi_la_SOURCES = comedi_wrap.c
+nodist__comedi_la_SOURCES = comedi_python_wrap.c
_comedi_la_CFLAGS = $(COMEDILIB_CFLAGS) $(PYTHON_INCLUDES) $(PYTHON_QUIET)
_comedi_la_LDFLAGS = -module -avoid-version $(COMEDILIB_LIBS)
pyexec_SCRIPTS = comedi.py
-EXTRA_DIST = README.txt setup.py test_comedi.py
+EXTRA_DIST = README.txt comedi_python.i setup.py test_comedi.py
-comedi_wrap.c comedi.py: $(srcdir)/../comedi.i
- $(SWIG) -python -o comedi_wrap.c -I$(top_srcdir)/include $(srcdir)/../comedi.i
+comedi_python_wrap.c comedi.py: $(srcdir)/comedi_python.i $(srcdir)/../comedi.i
+ $(SWIG) -python -o comedi_python_wrap.c -I$(top_srcdir)/include -I$(srcdir)/.. $(srcdir)/comedi_python.i
module1 = Extension('_comedi',
define_macros = [('MAJOR_VERSION','0'),
('MINOR_VERSION','1')],
- include_dirs = ['../include'],
- library_dirs = ['../lib'],
+ include_dirs = ['../../include'],
+ library_dirs = ['../../lib'],
+ swig_opts = ['-I../../include', '-I..'],
libraries = ['comedi'],
- sources = ['comedi_wrap.c'])
+ sources = ['comedi_python.i'])
-setup (name='_comedi',
+setup (name='comedi',
version = '0.1',
description = 'Python wrapper module for the Comedi data-acquisition drivers',
author = 'Bryan E. Cole',
author_email = 'bryan.cole@teraview.co.uk',
long_description = ''' Wrapper for the Comedi data-acquisition library ''',
- ext_modules = [module1])
+ ext_modules = [module1],
+ py_modules = ['comedi'])