source: coopr/tags/3.5.8787/setup.py @ 9516

Last change on this file since 9516 was 9516, checked in by wehart, 4 years ago

Revising the requirements for the
latest Coopr release to specify the version of PyUtilib?.

File size: 3.4 KB
Line 
1#  _________________________________________________________________________
2#
3#  Coopr: A COmmon Optimization Python Repository
4#  Copyright (c) 2008 Sandia Corporation.
5#  This software is distributed under the BSD License.
6#  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
7#  the U.S. Government retains certain rights in this software.
8#  _________________________________________________________________________
9
10"""
11Script to generate the installer for coopr.
12"""
13
14import sys
15import glob
16import os
17
18def _find_packages(path):
19    """
20    Generate a list of nested packages
21    """
22    pkg_list=[]
23    if not os.path.exists(path):
24        return []
25    if not os.path.exists(path+os.sep+"__init__.py"):
26        return []
27    else:
28        pkg_list.append(path)
29    for root, dirs, files in os.walk(path, topdown=True):
30        if root in pkg_list and "__init__.py" in files:
31            for name in dirs:
32                if os.path.exists(root+os.sep+name+os.sep+"__init__.py"):
33                    pkg_list.append(root+os.sep+name)
34    return [pkg for pkg in map(lambda x:x.replace(os.sep,"."), pkg_list)]
35
36def read(*rnames):
37    return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
38
39requires=[
40            'PyUtilib==4.7.3340',
41            'coopr.age>=1.1.4',
42            'coopr.bilevel>=1.0',
43            'coopr.core>=2.0.4',
44            'coopr.dae>=1.2',
45            'coopr.environ>=1.0.1',
46            'coopr.gdp>=1.2',
47            'coopr.misc>=2.8.2',
48            'coopr.mpec>=1.0',
49            'coopr.neos>=1.1.2',
50            'coopr.openopt>=1.1.3',
51            'coopr.opt>=2.12.2',
52            'coopr.os>=1.0.4',
53            'coopr.pyomo>=3.6.4',
54            'coopr.pysos>=2.0.9',
55            'coopr.pysp>=3.5.5',
56            'coopr.solvers>=3.2.1',
57            'coopr.sucasa>=3.0',
58            'ply',
59            'nose',
60            'six>=1.6.1'
61            ]
62if sys.version_info < (2,7):
63        requires.append('argparse')
64        requires.append('unittest2')
65        requires.append('ordereddict')
66
67from setuptools import setup
68packages = _find_packages('coopr')
69
70setup(name='Coopr',
71      # Note: trunk should have *next* major.minor
72      #       VOTD + Final releases will have major.minor.revnum
73      # When cutting a release, ALSO update _major/_minor/_micro in
74      #   coopr/coopr/__init__.py
75      #   coopr/RELEASE.txt
76      version='3.5.8787',
77      maintainer='William E. Hart',
78      maintainer_email='wehart@sandia.gov',
79      url = 'https://software.sandia.gov/coopr',
80      license = 'BSD',
81      platforms = ["any"],
82      description = 'Coopr: a COmmon Optimization Python Repository',
83      long_description = read('README.txt'),
84      classifiers = [
85            'Development Status :: 4 - Beta',
86            'Intended Audience :: End Users/Desktop',
87            'Intended Audience :: Science/Research',
88            'License :: OSI Approved :: BSD License',
89            'Natural Language :: English',
90            'Operating System :: Microsoft :: Windows',
91            'Operating System :: Unix',
92            'Programming Language :: Python',
93            'Programming Language :: Unix Shell',
94            'Topic :: Scientific/Engineering :: Mathematics',
95            'Topic :: Software Development :: Libraries :: Python Modules'
96        ],
97      packages=packages,
98      keywords=['optimization'],
99      namespace_packages=['coopr'],
100      install_requires=requires
101      )
Note: See TracBrowser for help on using the repository browser.