Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 492

Show
Ignore:
Timestamp:
07/21/05 13:36:46
Author:
speno
Message:

applied patch from dowski to address issue #74
setup.py exits if used with wrong version of python
formatting changes to eliminating long lines

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/setup.py

    r452 r492  
     1"""Installs CherryPy using distutils 
     2 
     3Run: 
     4    python setup.py install 
     5 
     6to install this package. 
     7""" 
     8 
    19from distutils.core import setup 
     10from distutils.command.install import INSTALL_SCHEMES 
     11import sys 
    212 
    3 import sys 
    4 # patch distutils if it can't cope with the "classifiers" keyword 
    5 if sys.version < '2.2.3': 
    6     from distutils.dist import DistributionMetadata 
    7     DistributionMetadata.classifiers = None 
    8     DistributionMetadata.download_url = None 
     13required_python_version = '2.3' 
    914 
    10 setup(name="CherryPy", 
    11       version="2.1.0-beta", 
    12       description="Object-Oriented web development framework", 
    13       long_description="""CherryPy is a pythonic, object-oriented web development framework.""", 
    14       classifiers=["Development Status :: Stable", 
    15                    "Intended Audience :: Developers", 
    16                    "License :: Freely Distributable", 
    17                    "Programming Language :: Python", 
    18                    "Topic :: Internet ", 
    19                    "Topic :: Software Development :: Libraries :: Application Frameworks", 
    20                    ], 
    21       author="CherryPy Team", 
    22       author_email="team@cherrypy.org", 
    23       url="http://www.cherrypy.org", 
    24       license="BSD", 
    25       packages=["cherrypy", "cherrypy.lib", "cherrypy.lib.filter", "cherrypy.lib.filter.sessionfilter", "cherrypy.tutorial", "cherrypy.test"], 
    26       download_url="http://www.cherrypy.org/wiki/CherryPyDownload", 
    27 
     15############################################################################### 
     16# arguments for the setup command 
     17############################################################################### 
     18name = "CherryPy" 
     19version = "2.1.0-beta" 
     20desc = "Object-Oriented web development framework" 
     21long_desc = "CherryPy is a pythonic, object-oriented web development framework" 
     22classifiers=[ 
     23    "Development Status :: Stable", 
     24    "Intended Audience :: Developers", 
     25    "License :: Freely Distributable", 
     26    "Programming Language :: Python", 
     27    "Topic :: Internet ", 
     28    "Topic :: Software Development :: Libraries :: Application Frameworks", 
     29
     30author="CherryPy Team" 
     31author_email="team@cherrypy.org" 
     32url="http://www.cherrypy.org" 
     33cp_license="BSD" 
     34packages=[ 
     35    "cherrypy", "cherrypy.lib", "cherrypy.lib.filter", 
     36    "cherrypy.lib.filter.sessionfilter", "cherrypy.tutorial", 
     37    "cherrypy.test", 
     38
     39download_url="http://www.cherrypy.org/wiki/CherryPyDownload" 
     40data_files=[ 
     41    ('cherrypy/tutorial', 
     42        [ 
     43            'cherrypy/tutorial/tutorial.conf', 
     44            'cherrypy/tutorial/README.txt', 
     45        ] 
     46    ), 
     47    ('cherrypy', ['cherrypy/favicon.ico',]), 
     48    ('cherrypy/test', ['cherrypy/test/style.css',]), 
     49    ('cherrypy/test/static', ['cherrypy/test/static/index.html',]), 
     50
     51############################################################################### 
     52# end arguments for setup 
     53############################################################################### 
    2854 
     55def main(): 
     56    if sys.version < required_python_version: 
     57        s = "I'm sorry, but %s %s requires Python %s or later." 
     58        print s % (name, version, required_python_version) 
     59        sys.exit(1) 
     60 
     61    # set default location for "data_files" to platform specific "site-packages" 
     62    # location 
     63    for scheme in INSTALL_SCHEMES.values(): 
     64        scheme['data'] = scheme['purelib'] 
     65 
     66    setup( 
     67        name=name, 
     68        version=version, 
     69        description=desc, 
     70        long_description=long_desc, 
     71        classifiers=classifiers, 
     72        author=author, 
     73        author_email=author_email, 
     74        url=url, 
     75        license=cp_license, 
     76        packages=packages, 
     77        download_url=download_url, 
     78        data_files=data_files, 
     79    ) 
     80 
     81if __name__ == "__main__": 
     82    main() 

Hosted by WebFaction

Log in as guest/cpguest to create tickets