Use `with Closing(...) as f:` in JPKDriver._zip_segment().
[hooke.git] / setup.py
1 # Copyright (C) 2010 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
6 # under the terms of the GNU Lesser General Public License as
7 # published by the Free Software Foundation, either version 3 of the
8 # License, or (at your option) any later version.
9 #
10 # Hooke is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
13 # Public License for more details.
14 #
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with Hooke.  If not, see
17 # <http://www.gnu.org/licenses/>.
18
19 """Hooke: tools for analyzing force spectroscopy data.
20
21 Mercurial repository:
22 http://www.physics.drexel.edu/~wking/code/hg/hooke/
23 """
24
25 from distutils.core import setup
26 from os import walk
27 import os.path
28
29 from hooke import version
30
31
32 classifiers = """\
33 Development Status :: 3 - Alpha
34 Intended Audience :: Science/Research
35 Operating System :: OS Independent
36 License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
37 Programming Language :: Python
38 Topic :: Scientific/Engineering
39 """
40
41 doclines = __doc__.split("\n")
42
43 def find_packages(root='hooke'):
44     packages = []
45     prefix = '.'+os.path.sep
46     for dirpath,dirnames,filenames in walk(root):
47         if '__init__.py' in filenames:
48             if dirpath.startswith(prefix):
49                 dirpath = dirpath[len(prefix):]
50             packages.append(dirpath.replace(os.path.sep, '.'))
51     return packages
52
53 packages = find_packages()
54
55 setup(name="Hooke",
56       version=version(),
57       maintainer="Massimo Sandal",
58       maintainer_email="hookesoftware@googlegroups.com",
59       url="http://code.google.com/p/hooke/",
60       download_url="http://www.physics.drexel.edu/~wking/code/hg/hgwebdir.gci/hooke/archive/%s.tar.gz" % version(3),
61       license = "GNU Lesser General Public License (LGPL)",
62       platforms = ["all"],
63       description = doclines[0],
64       long_description = "\n".join(doclines[2:]),
65       classifiers = filter(None, classifiers.split("\n")),
66       scripts = ['bin/hg.py'],
67       packages = packages,
68       provides = packages,
69       )