#!/usr/bin/env python
"""This is the distutils setup.py script for Aquarium."""
__docformat__ = "restructuredtext"
# Created: Sat Jul 24 12:56:56 PDT 2004
# Author: Shannon -jj Behrens
# Email: jjinux@users.sourceforge.net
#
# Copyright (c) Shannon -jj Behrens. All rights reserved.
import os
from distutils.core import setup
from distutils.sysconfig import get_python_lib
def appendPackages(packages, directory, files):
"""Append the directory to packages.
Ignore CVS directories. Use dots instead of slashes.
"""
if os.path.basename(directory) == "CVS":
return
package = directory.replace(os.path.sep, ".")
packages.append(package)
def appendTemplates(templatesDict, directory, files):
"""Create a mapping of directories to templates.
templatesDict is a dict mapping each directory to a list of templates in
that directory. Ignore CVS directories.
"""
if os.path.basename(directory) == "CVS":
return
for file in files:
if not file.endswith(".tmpl"):
continue
toDirectory = os.path.join(python_lib, directory)
file = os.path.join(directory, file)
if not templatesDict.has_key(toDirectory):
templatesDict[toDirectory] = []
templatesDict[toDirectory].append(file)
packages = []
for package in ["aquarium", "glass"]:
os.path.walk(package, appendPackages, packages)
python_lib = get_python_lib()
templatesDict = {}
os.path.walk("aquarium", appendTemplates, templatesDict)
data_files = templatesDict.items()
setup(
name='aquarium',
version=open('VERSION').read().rstrip().replace("_", ".")[len("RELEASE_"):],
description='Web Application Framework',
author='Shannon -jj Behrens',
author_email='jjinux@users.sourceforge.net',
url='http://aquarium.sourceforge.net/',
packages=packages,
scripts=['tools/FreezeSite'],
data_files=data_files,
long_description="""\
Aquarium is a Web application framework written in Python. It provides an
approach to producing a Web application without duplication of effort by
reducing the amount of code you need to write. It offers convenient libraries
and extensible APIs for items such as session management and Web server
integration including CGI, mod_python, FastCGI, or its own Web server, Glass.
It provides tight integration with Cheetah including autocompilation of Cheetah
templates. Last of all, it offers a convenient approach to Web development
inspired by FreeTrade. As a developer, you just "plug in" modules; Aquarium
ties them all together.""",
download_url='http://sourceforge.net/project/showfiles.php?group_id=5453&package_id=5495',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: No Input/Output (Daemon)',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Internet :: WWW/HTTP :: HTTP Servers',
'Topic :: Software Development :: Libraries :: Application Frameworks',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)
|