Added distutils-based setup.py.
[hooke.git] / setup.py
1 """Hooke: tools for analyzing force spectroscopy data.
2
3 Mercurial repository:
4 http://www.physics.drexel.edu/~wking/code/hg/hooke/
5 """
6
7 from distutils.core import setup
8 from os import walk
9 import os.path
10
11 from hooke import version
12
13
14 classifiers = """\
15 Development Status :: 3 - Alpha
16 Intended Audience :: Science/Research
17 Operating System :: OS Independent
18 License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
19 Programming Language :: Python
20 Topic :: Scientific/Engineering
21 """
22
23 doclines = __doc__.split("\n")
24
25 def find_packages():
26     packages = []
27     prefix = '.'+os.path.sep
28     for dirpath,dirnames,filenames in walk('.'):
29         if '__init__.py' in filenames:
30             if dirpath.startswith(prefix):
31                 dirpath = dirpath[len(prefix):]
32             packages.append(dirpath.replace(os.path.sep, '.'))
33     return packages
34
35 packages = find_packages()
36
37 setup(name="Hooke",
38       version=version(),
39       maintainer="Massimo Sandal",
40       maintainer_email="hookesoftware@googlegroups.com",
41       url="http://code.google.com/p/hooke/",
42       download_url="http://www.physics.drexel.edu/~wking/code/hg/hgwebdir.gci/hooke/archive/%s.tar.gz" % version(3),
43       license = "GNU Lesser General Public License (LGPL)",
44       platforms = ["all"],
45       description = doclines[0],
46       long_description = "\n".join(doclines[2:]),
47       classifiers = filter(None, classifiers.split("\n")),
48       scripts = ['bin/hooke'],
49       packages = packages,
50       provides = packages,
51       )