import os

from setuptools import find_packages, setup
from tgpisa import release
from turbogears.finddata import find_package_data

packages = find_packages()
package_data = find_package_data(where="tgpisa", package="tgpisa")
if os.path.isdir("locales"):
    packages.append("locales")
    package_data.update(
        find_package_data(where="locales", exclude=("*.po",), only_in_packages=False)
    )

setup(
    name="tgpisa",
    version=release.version,
    # uncomment the following lines if you fill them out in release.py
    # description=release.description,
    # author=release.author,
    # author_email=release.email,
    # url=release.url,
    # download_url=release.download_url,
    # license=release.license,
    install_requires=["TurboGears >= 1.0.4.3", "SQLObject>=0.8,<=0.10.0"],
    zip_safe=False,
    packages=packages,
    package_data=package_data,
    keywords=[
        # Use keywords if you'll be adding your package to the
        # Python Cheeseshop
        # if this has widgets, uncomment the next line
        # 'turbogears.widgets',
        # if this has a tg-admin command, uncomment the next line
        # 'turbogears.command',
        # if this has identity providers, uncomment the next line
        # 'turbogears.identity.provider',
        # If this is a template plugin, uncomment the next line
        # 'python.templating.engines',
        # If this is a full application, uncomment the next line
        # 'turbogears.app',
    ],
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Framework :: TurboGears",
        # if this is an application that you'll distribute through
        # the Cheeseshop, uncomment the next line
        # 'Framework :: TurboGears :: Applications',
        # if this is a package that includes widgets that you'll distribute
        # through the Cheeseshop, uncomment the next line
        # 'Framework :: TurboGears :: Widgets',
    ],
    test_suite="nose.collector",
    entry_points={"console_scripts": ["start-tgpisa = tgpisa.commands:start"]},
    # Uncomment next line and create a default.cfg file in your project dir
    # if you want to package a default configuration in your egg.
    # data_files = [('config', ['default.cfg'])],
)
