5d829bbac0a7084bf836f1ca2344b9b8b0f097e3
[hooke.git] / setup.py
1 # Copyright (C) 2010-2012 W. Trevor King <wking@drexel.edu>
2 #
3 # This file is part of Hooke.
4 #
5 # Hooke is free software: you can redistribute it and/or modify it under the
6 # terms of the GNU Lesser General Public License as published by the Free
7 # Software Foundation, either version 3 of the License, or (at your option) any
8 # later version.
9 #
10 # Hooke 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 Lesser General Public License for more
13 # details.
14 #
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with Hooke.  If not, see <http://www.gnu.org/licenses/>.
17
18 "Tools for analyzing force spectroscopy data."
19
20 import codecs
21 from distutils.core import setup
22 from os import walk
23 import os.path
24
25 from hooke import version
26
27
28 classifiers = """\
29 Development Status :: 3 - Alpha
30 Intended Audience :: Science/Research
31 Operating System :: OS Independent
32 License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
33 Programming Language :: Python
34 Topic :: Scientific/Engineering
35 """
36
37 doclines = __doc__.split("\n")
38
39 def find_packages(root='hooke'):
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 packages = find_packages()
50
51 _this_dir = os.path.dirname(__file__)
52
53 setup(name="Hooke",
54       version=version(),
55       maintainer="Massimo Sandal",
56       maintainer_email="hookesoftware@googlegroups.com",
57       url="http://code.google.com/p/hooke/",
58       download_url="http://www.physics.drexel.edu/~wking/code/hg/hgweb.cgi/hooke/archive/%s.tar.gz" % version(3),
59       license = "GNU Lesser General Public License (LGPL)",
60       platforms = ["all"],
61       description = __doc__,
62       long_description=codecs.open(
63         os.path.join(_this_dir, 'README'), 'r', encoding='utf-8').read(),
64       classifiers = list(filter(None, classifiers.split("\n"))),
65       scripts = ['bin/hk.py'],
66       packages = packages,
67       provides = packages,
68       )