1 | #!/usr/bin/env python |
---|
2 | # This program is public domain |
---|
3 | |
---|
4 | import os |
---|
5 | import sys |
---|
6 | import numpy |
---|
7 | |
---|
8 | if len(sys.argv) == 1: |
---|
9 | sys.argv.append('install') |
---|
10 | |
---|
11 | # BEFORE importing distutils, remove MANIFEST. distutils doesn't properly |
---|
12 | # update it when the contents of directories change. |
---|
13 | if os.path.exists('MANIFEST'): os.remove('MANIFEST') |
---|
14 | |
---|
15 | |
---|
16 | def configuration(parent_package='', |
---|
17 | top_path=None |
---|
18 | ): |
---|
19 | from numpy.distutils.misc_util import Configuration |
---|
20 | if numpy.__version__ < '1.0.0': |
---|
21 | raise RuntimeError, 'numpy version %s or higher required, but got %s'\ |
---|
22 | % ('1.0.0', numpy.__version__) |
---|
23 | |
---|
24 | config = Configuration(None, parent_package, top_path) |
---|
25 | |
---|
26 | config.set_options(ignore_setup_xxx_py=True, |
---|
27 | assume_default_configuration=True, |
---|
28 | delegate_options_to_subpackages=True, |
---|
29 | quiet=True |
---|
30 | ) |
---|
31 | |
---|
32 | config.add_subpackage('park') |
---|
33 | |
---|
34 | config.add_data_files( ('park','*.txt') ) |
---|
35 | config.add_data_files( ('park','park.epydoc') ) |
---|
36 | config.get_version(os.path.join('park','version.py')) # sets config.version |
---|
37 | |
---|
38 | return config |
---|
39 | |
---|
40 | |
---|
41 | |
---|
42 | def setup_package(): |
---|
43 | |
---|
44 | from numpy.distutils.core import setup |
---|
45 | from numpy.distutils.misc_util import Configuration |
---|
46 | |
---|
47 | setup( name = 'park', |
---|
48 | maintainer = "DANSE reflectometry group", |
---|
49 | maintainer_email = "unknown", |
---|
50 | description = "Distributed fitting service", |
---|
51 | url = "http://www.reflectometry.org/danse/park", |
---|
52 | license = 'BSD', |
---|
53 | configuration=configuration |
---|
54 | ) |
---|
55 | |
---|
56 | |
---|
57 | if __name__ == '__main__': |
---|
58 | setup_package() |
---|