root/PythonPackages/FuncDesigner/setup.py

Revision 1298, 3.0 kB (checked in by dmitrey, 6 months ago)

minor code cleanup

Line 
1 #! /usr/bin/env python
2
3 descr   = """
4 """
5
6 from os.path import join
7 import os
8 import sys
9
10 DISTNAME            = 'FuncDesigner'
11 DESCRIPTION         = 'A python module for function design and automatic derivatives'
12 LONG_DESCRIPTION    = descr
13 MAINTAINER          = 'Dmitrey Kroshko',
14 MAINTAINER_EMAIL    = 'dmitrey-at-openopt-dot-org',
15 URL                 = 'http://openopt.org',
16 LICENSE             = 'new BSD'
17 sys.path.append(os.getcwd() + os.sep + 'FuncDesigner')
18 from FuncDesigner import __version__ as Ver
19
20 DOWNLOAD_URL        = 'http://openopt.org/images/a/a6/FuncDesigner.zip'
21 try:
22     import setuptools
23 except:
24     print('you should have setuptools installed (http://pypi.python.org/pypi/setuptools), for some Linux distribs you can get it via [sudo] apt-get install python-setuptools')
25     print('press Enter for exit...')
26     raw_input()
27     exit()
28
29 from distutils.errors import DistutilsError
30 #from numpy.distutils.system_info import system_info, NotFoundError, dict_append, so_ext
31 from numpy.distutils.core import setup, Extension
32
33 DOC_FILES = []
34
35 def configuration(parent_package='',top_path=None, package_name=DISTNAME):
36     if os.path.exists('MANIFEST'): os.remove('MANIFEST')
37     pkg_prefix_dir = 'FuncDesigner'
38
39     # Get the version
40
41     from numpy.distutils.misc_util import Configuration
42     config = Configuration(package_name,parent_package,top_path,
43         version     = Ver,
44         maintainer  = MAINTAINER,
45         maintainer_email = MAINTAINER_EMAIL,
46         description = DESCRIPTION,
47         license = LICENSE,
48         url = URL,
49         download_url = DOWNLOAD_URL,
50         long_description = LONG_DESCRIPTION)
51
52
53     # XXX: once in SVN, should add svn version...
54     #print config.make_svn_version_py()
55
56     # package_data does not work with sdist for setuptools 0.5 (setuptools bug),
57     # so we need to add them here while the bug is not solved...
58
59     return config
60
61
62 if __name__ == "__main__":
63     # setuptools version of config script
64
65     # package_data does not work with sdist for setuptools 0.5 (setuptools bug)
66     # So we cannot add data files via setuptools yet.
67
68     #data_files = ['test_data/' + i for i in TEST_DATA_FILES]
69     #data_files.extend(['docs/' + i for i in doc_files])
70     setup(configuration = configuration,
71         install_requires='numpy', # can also add version specifiers   #namespace_packages=['kernel'],
72         #py_modules = ['kernel', 'tests', 'examples', 'solvers'],
73         packages=setuptools.find_packages(),
74         include_package_data = True,
75         #package_data = '*.txt',
76         test_suite='',#"openopt.tests", # for python setup.py test
77         zip_safe=False, # the package can run out of an .egg file
78         #FIXME url, download_url, ext_modules
79         classifiers =
80             [ 'Development Status :: 4 - Beta',
81               'Environment :: Console',
82               'Intended Audience :: Developers',
83               'Intended Audience :: Science/Research',
84               'License :: OSI Approved :: BSD License',
85               'Topic :: Scientific/Engineering']
86     )
Note: See TracBrowser for help on using the browser.