channel: add AnalogChannel.apply_calibration.
[pycomedi.git] / setup.py
1 # Copyright (C) 2008-2012 W. Trevor King <wking@tremily.us>
2 #
3 # This file is part of pycomedi.
4 #
5 # pycomedi is free software: you can redistribute it and/or modify it under the
6 # terms of the GNU General Public License as published by the Free Software
7 # Foundation, either version 2 of the License, or (at your option) any later
8 # version.
9 #
10 # pycomedi is distributed in the hope that it will be useful, but WITHOUT ANY
11 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License along with
15 # pycomedi.  If not, see <http://www.gnu.org/licenses/>.
16
17 "An object-oriented interface for the Comedi drivers."
18
19 from distutils.core import setup
20 from distutils.extension import Extension
21 import os
22 import os.path
23
24 from Cython.Distutils import build_ext
25 import numpy
26
27 from pycomedi import __version__
28
29
30 package_name = 'pycomedi'
31 classifiers = """\
32 Development Status :: 2 - Pre-Alpha
33 Intended Audience :: Developers
34 Intended Audience :: Science/Research
35 Operating System :: POSIX
36 Operating System :: Unix
37 License :: OSI Approved :: GNU General Public License (GPL)
38 Programming Language :: Python
39 Topic :: Scientific/Engineering
40 Topic :: Software Development :: Libraries :: Python Modules
41 """
42
43 _this_dir = os.path.dirname(__file__)
44
45 ext_modules = []
46 for filename in sorted(os.listdir(package_name)):
47     basename,extension = os.path.splitext(filename)
48     if extension == '.pyx':
49         ext_modules.append(
50             Extension(
51                 '%s.%s' % (package_name, basename),
52                 [os.path.join(package_name, filename)],
53                 libraries=['comedi'],
54                 include_dirs=[numpy.get_include()],
55                 ))
56
57 setup(name=package_name,
58       version=__version__,
59       maintainer='W. Trevor King',
60       maintainer_email='wking@tremily.us',
61       url='http://blog.tremily.us/posts/{}/'.format(package_name),
62       download_url='http://git.tremily.us/?p={}.git;a=snapshot;h={};sf=tgz'.format(
63         package_name, __version__),
64       license='GNU General Public License (GPL)',
65       platforms=['all'],
66       description=__doc__,
67       long_description=open(os.path.join(_this_dir, 'README'), 'r').read(),
68       classifiers=filter(None, classifiers.split('\n')),
69       packages=[package_name],
70       provides=[package_name],
71       cmdclass = {'build_ext': build_ext},
72       ext_modules = ext_modules,
73       )