source: releases/mystic-0.2a1/setup.py @ 240

Revision 240, 1.8 KB checked in by mmckerns, 6 years ago (diff)

tag for the mystic-0.2a1 release

Line 
1#!/usr/bin/env python
2#
3# Michael McKerns
4# mmckerns@caltech.edu
5
6# check if easy_install is available
7try:
8#   import __force_distutils__ #XXX: uncomment to force use of distutills
9    from setuptools import setup
10    has_setuptools = True
11except ImportError:
12    from distutils.core import setup
13    has_setuptools = False
14
15# build the 'setup' call
16setup_code = """
17setup(name='mystic',
18      version='0.2a1',
19      description='a simple interactive inversion analysis framework',
20      author = 'Mike McKerns',
21      maintainer = 'Mike McKerns',
22      maintainer_email = 'mmckerns@caltech.edu',
23      license = 'BSD',
24      platforms = ['any'],
25      url = 'http://mmckerns.github.io/~mmckerns',
26      classifiers = ('Intended Audience :: Developers',
27                     'Programming Language :: Python',
28                     'Topic :: Physics Programming'),
29
30      packages = ['mystic','mystic.models','mystic.math'],
31      package_dir = {'mystic':'mystic','mystic.models':'models',
32                     'mystic.math':'_math'},
33"""
34
35# add dependencies
36numpy_version = '>=1.0'
37matplotlib_version = '>=0.91'
38if has_setuptools:
39    setup_code += """
40      install_requires = ('numpy%s'),
41""" % numpy_version
42
43# close 'setup' call
44setup_code += """   
45      zip_safe=True,
46      scripts=[])
47"""
48
49# exec the 'setup' code
50exec setup_code
51
52# if dependencies are missing, print a warning
53try:
54    import numpy
55    #import matplotlib #XXX: has issues being zip_safe
56except ImportError:
57    print "\n***********************************************************"
58    print "WARNING: One of the following dependencies is unresolved:"
59    print "    numpy %s" % numpy_version
60    print "    matplotlib %s (optional)" % matplotlib_version
61    print "***********************************************************\n"
62
63
64if __name__=='__main__':
65    pass
66
67# end of file
Note: See TracBrowser for help on using the repository browser.