-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
executable file
·80 lines (61 loc) · 2.07 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/usr/bin/env python
# use setuptools or distutils
# ---------------------------
import os
extra_args={'cmdclass': {}}
try:
from setuptools import setup, find_packages, Command
except ImportError:
print "WARNING: setuptools not available, falling back to distutils!"
from distutils.core import setup, Command
class xtest(Command):
description = "run tests"
user_options = []
def initialize_options(self): pass
def finalize_options(self): pass
def run(self):
import test.test, unittest, sys
sys.argv = [sys.argv[0]]
unittest.TextTestRunner(verbosity=2).run(test.test.suite())
raise SystemExit(0)
extra_args['cmdclass']['test'] = xtest
# docs
# ----
class doc(Command):
description = "generate documentation"
user_options = []
def initialize_options(self): pass
def finalize_options(self): pass
def run(self):
try: os.makedirs('doc')
except OSError: pass
modname = 'hdf5pickle'
os.system("epydoc -v --no-frames -o doc %s" % modname)
extra_args['cmdclass']['doc'] = doc
# setup
# -----
setup(
name = "hdf5pickle",
version = "0.2.1",
packages = ["hdf5pickle"],
author = "Pauli Virtanen",
author_email = "pav@iki.fi",
description = "Pickle Python objects to HDF5 files",
license = "BSD & Python Software Foundation License",
keywords = "hdf5 pickle pytables",
url = "",
install_requires = ['tables >= 2.0b1'],
long_description = """
Create easily interfaceable representations of Python objects in HDF5
files. The aim of this module is to provide both
(1) convenient Python object persistence
(2) compatibility with non-Python applications
Point 2 is useful, for example, if results from numerical
calculations should be easily transferable for example to a non-Python
visualization program. For example, if program state is serialized to
a HDF5 file, it can easily be examined with for example Octave_.
.. _Octave: http://www.octave.org/
""",
test_suite = "test.test",
**extra_args
)