# Copyright (C) 2010 Leonard Thomas # # This file is part of Dodai. # # Dodai is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Dodai is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Dodai. If not, see . PACKAGE = 'dodai' LICENSE='GPLv3' VERSION = '0.3' AUTHOR='Leonard Thomas' AUTHOR_EMAIL='six@choushi.net' URL='http://code.google.com/p/dodai' DOWNLOAD_URL = 'http://code.google.com/p/dodai/downloads/list' PY_VERSION_LOW = '2.6.0' PY_VERSION_HIGH = '3.0.0' PLATFORMS = ['Linux'] SETUP_REQUIRES=['sqlalchemy'] CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU Affero General Public License v3', 'Natural Language :: English', 'Operating System :: POSIX', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Topic :: Database', 'Topic :: Software Development', 'Topic :: Software Development :: Libraries', 'Topic :: Software Development :: Libraries :: Application Frameworks', 'Topic :: Software Development :: Libraries :: Python Modules',] DESCRIPTION = 'Tools for writing python scripts' LONG_DESCRIPTION = "This module is to be a foundation to your command line "\ "python scripts. This module provides for quick access to logger, "\ "configparser, optionparse and databases via sqlalchemy."\ import sys import platform import paver import paver.setuputils from paver.easy import options from paver.easy import Bunch from paver.easy import task from paver.easy import needs from paver.misctasks import generate_setup from paver.misctasks import minilib from setuptools import setup from setuptools import find_packages #from paver.easy import * #from paver.misctasks import generate_setup, minilib #from setuptools import setup, find_packages #import paver.setuputils paver.setuputils.install_distutils_tasks() options( setup=Bunch( name=PACKAGE, version=VERSION, zip_safe=False, description=DESCRIPTION, author=AUTHOR, author_email=AUTHOR_EMAIL, url=URL, download_url=DOWNLOAD_URL, packages=find_packages(), classifiers=CLASSIFIERS, long_description=LONG_DESCRIPTION, license=LICENSE, setup_requires=SETUP_REQUIRES, install_requires=[], platforms = PLATFORMS )) def is_valid_version(): if sys.version >= PY_VERSION_LOW and sys.version < PY_VERSION_HIGH: return True else: return False def is_valid_platform(): if platform.system() in PLATFORMS: return True else: return False @task def build(): if not is_valid_version(): raise Exception('Invalid Python version') if not is_valid_platform(): error='{0} not install on: {1}'.format(PACKAGE, platform.system()) raise Exception(error) @task @needs('build', 'generate_setup', 'minilib', 'setuptools.command.sdist') def sdist(): """Overrides sdist to make sure that our setup.py is generated.""" pass