-
Notifications
You must be signed in to change notification settings - Fork 20
/
setup.py
69 lines (61 loc) · 1.93 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/env python
import sys
# setuptools allows magic downloading of dependencies
# but setuptools is often broken, so swallow the error if it's not there.
try:
from setuptools import setup
HAS_SETUPTOOLS = True
except ImportError:
from distutils.core import setup
HAS_SETUPTOOLS = False
from cascadenik import __version__ as VERSION
options = dict(name='cascadenik',
version = VERSION,
description='Cascading Stylesheets For Mapnik',
author='Michal Migurski',
author_email='[email protected]',
platforms='OS Independent',
license='todo',
requires=['Mapnik', 'cssutils'],
keywords='Mapnik,xml,css,mapping',
url='https://github.com/mapnik/Cascadenik',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Utilities'
],
zip_safe=False,
scripts=['cascadenik-compile.py','cascadenik-style.py', 'cascadenik-extract-dscfg.py'],
packages=['cascadenik'],
)
try:
options['long_description'] = file('README.md','rb').read()
except IOError:
pass
if HAS_SETUPTOOLS:
options.update({'install_requires':['cssutils>0.9.0']})
setup(**options)
if not HAS_SETUPTOOLS:
warning = '\n***Warning*** Cascadenik also requires'
missing = False
try:
import PIL
# todo import Image ?
except:
try:
import Image
except:
missing = True
warning +=' PIL (easy_install PIL)'
try:
import cssutils
except:
missing = True
warning +' cssutils (easy_install cssutils)'
if missing:
sys.stderr.write('%s\n' % warning)