Add a method for extracting input channels by name.
[pypiezo.git] / setup.py
1 # Copyright (C) 2009-2011 W. Trevor King <wking@drexel.edu>
2 #
3 # This file is part of pypiezo.
4 #
5 # pypiezo is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by the
7 # Free Software Foundation, either version 3 of the License, or (at your
8 # option) any later version.
9 #
10 # pypiezo is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 # General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with pypiezo.  If not, see <http://www.gnu.org/licenses/>.
17
18 "Tools for controlling piezoelectric actuators."
19
20 from distutils.core import setup
21 from os import walk
22 import os.path
23
24 from pypiezo import __version__
25
26
27 classifiers = """\
28 Development Status :: 2 - Pre-Alpha
29 Intended Audience :: Developers
30 Intended Audience :: Science/Research
31 Operating System :: POSIX
32 Operating System :: Unix
33 License :: OSI Approved :: GNU General Public License (GPL)
34 Programming Language :: Python
35 Topic :: Scientific/Engineering
36 Topic :: Software Development :: Libraries :: Python Modules
37 """
38
39 def find_packages(root='pypiezo'):
40     packages = []
41     prefix = '.'+os.path.sep
42     for dirpath,dirnames,filenames in walk(root):
43         if '__init__.py' in filenames:
44             if dirpath.startswith(prefix):
45                 dirpath = dirpath[len(prefix):]
46             packages.append(dirpath.replace(os.path.sep, '.'))
47     return packages
48
49 _this_dir = os.path.dirname(__file__)
50 packages = find_packages()
51
52 setup(name='pypiezo',
53       version=__version__,
54       maintainer='W. Trevor King',
55       maintainer_email='wking@drexel.edu',
56       url='http://www.physics.drexel.edu/~wking/unfolding-disasters/pypiezo/',
57       download_url='http://www.physics.drexel.edu/~wking/code/python/pypiezo-%s.tar.gz' % __version__,
58       license='GNU General Public License (GPL)',
59       platforms=['all'],
60       description=__doc__,
61       long_description=open(os.path.join(_this_dir, 'README'), 'r').read(),
62       classifiers=filter(None, classifiers.split('\n')),
63       packages=packages,
64       provides=['pypiezo (%s)' % __version__],
65       requires=['pycomedi (>= 0.3)'],
66       )