diff options
Diffstat (limited to 'pavement.py')
-rw-r--r-- | pavement.py | 116 |
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 | |||
18 | PACKAGE = 'dodai' | ||
19 | LICENSE='GPLv3' | ||
20 | VERSION = '0.3' | ||
21 | AUTHOR='Leonard Thomas' | ||
22 | AUTHOR_EMAIL='six@choushi.net' | ||
23 | URL='http://code.google.com/p/dodai' | ||
24 | DOWNLOAD_URL = 'http://code.google.com/p/dodai/downloads/list' | ||
25 | PY_VERSION_LOW = '2.6.0' | ||
26 | PY_VERSION_HIGH = '3.0.0' | ||
27 | PLATFORMS = ['Linux'] | ||
28 | SETUP_REQUIRES=['sqlalchemy', 'chardet'] | ||
29 | CLASSIFIERS = [ | ||
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',] | ||
44 | DESCRIPTION = 'Tools for writing python scripts' | ||
45 | LONG_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 | |||
51 | import sys | ||
52 | import platform | ||
53 | import paver | ||
54 | import paver.setuputils | ||
55 | from paver.easy import options | ||
56 | from paver.easy import Bunch | ||
57 | from paver.easy import task | ||
58 | from paver.easy import needs | ||
59 | from paver.misctasks import generate_setup | ||
60 | from paver.misctasks import minilib | ||
61 | from setuptools import setup | ||
62 | from 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 | ||
68 | paver.setuputils.install_distutils_tasks() | ||
69 | |||
70 | options( | ||
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 | |||
91 | def 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 | |||
97 | def is_valid_platform(): | ||
98 | if platform.system() in PLATFORMS: | ||
99 | return True | ||
100 | else: | ||
101 | return False | ||
102 | |||
103 | @task | ||
104 | def 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') | ||
114 | def sdist(): | ||
115 | """Overrides sdist to make sure that our setup.py is generated.""" | ||
116 | pass | ||