source: coopr.sucasa/trunk/setup.py @ 1810

Last change on this file since 1810 was 1810, checked in by wehart, 11 years ago

Updates to Python package setup scripts.

File size: 2.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.sucasa.
12"""
13
14import glob
15import os
16
17def _find_packages(path):
18    """
19    Generate a list of nested packages
20    """
21    pkg_list=[]
22    if not os.path.exists(path):
23        return []
24    if not os.path.exists(path+os.sep+"__init__.py"):
25        return []
26    else:
27        pkg_list.append(path)
28    for root, dirs, files in os.walk(path, topdown=True):
29      if root in pkg_list and "__init__.py" in files:
30         for name in dirs:
31           if os.path.exists(root+os.sep+name+os.sep+"__init__.py"):
32              pkg_list.append(root+os.sep+name)
33    return map(lambda x:x.replace(os.sep,"."), pkg_list)
34
35def read(*rnames):
36    return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
37
38try:
39    from setuptools import setup
40    packages = _find_packages('coopr')
41except:
42    from distutils.core import setup
43    packages = _find_packages('coopr')
44
45scripts = glob.glob("scripts/*")
46
47setup(name='coopr.sucasa',
48      version='2.0',
49      maintainer='William E. Hart',
50      maintainer_email='wehart@sandia.gov',
51      url = 'https://software.sandia.gov/svn/public/coopr/coopr.sucasa',
52      license = 'BSD',
53      platforms = ["any"],
54      description = 'Coopr framework for integrating symbolic data into MIP solvers',
55      long_description = read('README.txt'),
56      classifiers = [
57            'Development Status :: 4 - Beta',
58            'Intended Audience :: End Users/Desktop',
59            'Intended Audience :: Science/Research',
60            'License :: OSI Approved :: BSD License',
61            'Natural Language :: English',
62            'Operating System :: Microsoft :: Windows',
63            'Operating System :: Unix',
64            'Programming Language :: Python',
65            'Programming Language :: Unix Shell',
66            'Topic :: Scientific/Engineering :: Mathematics',
67            'Topic :: Software Development :: Libraries :: Python Modules'
68        ],
69      packages=packages,
70      keywords=['optimization'],
71      scripts=scripts,
72      namespace_packages=['coopr']
73      )
74
Note: See TracBrowser for help on using the repository browser.