Source

django-autotree / setup.py

Full commit
import os
from setuptools import setup
import sys
from autotree import __author__, __version__, __email__, __status__, __license__

f = open(os.path.join(os.path.dirname(__file__), 'README'))
readme = f.read()
f.close()

def run_app_tests():
    from django.conf import settings

    settings.configure(INSTALLED_APPS=['autotree'],
                       DATABASES = {
                                        'default': {
                                            'ENGINE': 'django.db.backends.sqlite3',
                                            'NAME': '.'
                                        }
                                    })

    from django.test.utils import setup_test_environment

    setup_test_environment()

    from django.test.simple import run_tests

    if run_tests(['autotree']):
        sys.exit(1)

def get_development_status(status):
    status_classifiers = {
        'Planning': 'Development Status :: 1 - Planning',
        'Pre-Alpha': 'Development Status :: 2 - Pre-Alpha',
        'Alpha': 'Development Status :: 3 - Alpha',
        'Beta': 'Development Status :: 4 - Beta',
        'Production': 'Development Status :: 5 - Production/Stable',
        'Mature': 'Development Status :: 6 - Mature',
        'Inactive': 'Development Status :: 7 - Inactive,'
    }

    return status_classifiers[status]

run_app_tests()

setup(
    name='django-autotree',
    version=__version__,
    description='This reusable Django app introduces auto generation of site trees, menus and breadcrumbs navigation elements based on existing/newly created data.',
    long_description=readme,
    author=__author__,
    author_email=__email__,
    url='http://bitbucket.org/the_drow/django-autotree',
    packages=['autotree'],
    include_package_data=True,
    install_requires=['setuptools>=0.6c11', 'django>=1.2', 'django-sitetree>=0.3'],
    zip_safe=False,
    classifiers=[
        get_development_status(__status__),
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: %s License' % __license__,
        'Operating System :: OS Independent',
        'Programming Language :: Python',
    ],
)