aboutsummaryrefslogtreecommitdiff
path: root/pavement.py
diff options
context:
space:
mode:
Diffstat (limited to 'pavement.py')
-rw-r--r--pavement.py116
1 files changed, 0 insertions, 116 deletions
diff --git a/pavement.py b/pavement.py
deleted file mode 100644
index b880183..0000000
--- a/pavement.py
+++ /dev/null
@@ -1,116 +0,0 @@
1# Copyright (C) 2010 Leonard Thomas
2#
3# This file is part of Dodai.
4#
5# Dodai is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation, either version 3 of the License, or
8# (at your option) any later version.
9#
10# Dodai is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with Dodai. If not, see <http://www.gnu.org/licenses/>.
17
18PACKAGE = 'dodai'
19LICENSE='GPLv3'
20VERSION = '0.3'
21AUTHOR='Leonard Thomas'
22AUTHOR_EMAIL='six@choushi.net'
23URL='http://code.google.com/p/dodai'
24DOWNLOAD_URL = 'http://code.google.com/p/dodai/downloads/list'
25PY_VERSION_LOW = '2.6.0'
26PY_VERSION_HIGH = '3.0.0'
27PLATFORMS = ['Linux']
28SETUP_REQUIRES=['sqlalchemy', 'chardet']
29CLASSIFIERS = [
30 'Development Status :: 4 - Beta',
31 'Environment :: Console',
32 'Intended Audience :: Developers',
33 'License :: OSI Approved :: GNU Affero General Public License v3',
34 'Natural Language :: English',
35 'Operating System :: POSIX',
36 'Operating System :: POSIX :: Linux',
37 'Programming Language :: Python',
38 'Programming Language :: Python :: 2.6',
39 'Topic :: Database',
40 'Topic :: Software Development',
41 'Topic :: Software Development :: Libraries',
42 'Topic :: Software Development :: Libraries :: Application Frameworks',
43 'Topic :: Software Development :: Libraries :: Python Modules',]
44DESCRIPTION = 'Tools for writing python scripts'
45LONG_DESCRIPTION = "This module is to be a foundation to your command line "\
46 "python scripts. This module provides for quick access to logger, "\
47 "configparser, optionparse and databases via sqlalchemy."\
48
49
50
51import sys
52import platform
53import paver
54import paver.setuputils
55from paver.easy import options
56from paver.easy import Bunch
57from paver.easy import task
58from paver.easy import needs
59from paver.misctasks import generate_setup
60from paver.misctasks import minilib
61from setuptools import setup
62from setuptools import find_packages
63
64#from paver.easy import *
65#from paver.misctasks import generate_setup, minilib
66#from setuptools import setup, find_packages
67#import paver.setuputils
68paver.setuputils.install_distutils_tasks()
69
70options(
71 setup=Bunch(
72 name=PACKAGE,
73 version=VERSION,
74 zip_safe=False,
75 description=DESCRIPTION,
76 author=AUTHOR,
77 author_email=AUTHOR_EMAIL,
78 url=URL,
79 download_url=DOWNLOAD_URL,
80 packages=find_packages(),
81 classifiers=CLASSIFIERS,
82 long_description=LONG_DESCRIPTION,
83 license=LICENSE,
84 setup_requires=SETUP_REQUIRES,
85 install_requires=['sqlalchemy', 'chardet'],
86 platforms = PLATFORMS
87
88))
89
90
91def is_valid_version():
92 if sys.version >= PY_VERSION_LOW and sys.version < PY_VERSION_HIGH:
93 return True
94 else:
95 return False
96
97def is_valid_platform():
98 if platform.system() in PLATFORMS:
99 return True
100 else:
101 return False
102
103@task
104def build():
105 if not is_valid_version():
106 raise Exception('Invalid Python version')
107 if not is_valid_platform():
108 error='{0} not install on: {1}'.format(PACKAGE, platform.system())
109 raise Exception(error)
110
111
112@task
113@needs('build', 'generate_setup', 'minilib', 'setuptools.command.sdist')
114def sdist():
115 """Overrides sdist to make sure that our setup.py is generated."""
116 pass