-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
77 lines (69 loc) · 2.4 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
70
71
72
73
74
75
76
77
"""
pyconizr
Generate sprites from SVG icons
(c) 2014 Thomas Khyn
MIT license (see LICENSE.txt)
"""
from setuptools import setup, find_packages
import os
import sys
# imports __version__ variable
exec(open('pyconizr/version.py').read())
dev_status = __version_info__[3]
if dev_status == 'alpha' and not __version_info__[4]:
dev_status = 'pre'
DEV_STATUS = {'pre': '2 - Pre-Alpha',
'alpha': '3 - Alpha',
'beta': '4 - Beta',
'rc': '5 - Production/Stable',
'final': '5 - Production/Stable'}
# setup function parameters
setup(
name='pyconizr',
version=__version__,
description='Generate sprites from SVG icons',
long_description=open(os.path.join('README.rst')).read(),
author='Thomas Khyn',
author_email='[email protected]',
url='https://bitbucket.org/tkhyn/pyconizr/',
keywords=['iconizr', 'SVG', 'PNG', 'sprite'],
classifiers=[
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Development Status :: %s' % DEV_STATUS[dev_status],
'Intended Audience :: Developers',
'Environment :: Console',
'Topic :: Multimedia :: Graphics :: Graphics Conversion',
'Topic :: Multimedia :: Graphics :: Editors :: Vector-Based',
'Topic :: Software Development :: Build Tools',
],
packages=find_packages(exclude=('tests',)),
install_requires=(
'scour>=0.29',
'lxml>=3.3',
'jinja2>=2.7',
) + (('ordereddict',) if sys.version_info < (2.7) else ()),
entry_points={
'console_scripts': [
'pyconizr = pyconizr.run:execute_from_cl'
],
}
)
try:
import cairo
try:
import rsvg
except ImportError:
from gi.repository import Rsvg
except ImportError:
import warnings
warnings.warn("""
*********************************** WARNING ***********************************
To use Pyconizr\'s PNG functionalities, you need to install cairo and rsvg as
well as their Python bindings.
On Windows, the easiest way to do it is to download and install the
all-in-one version of PyGTK (python 2.6 and 2.7) or PyGI (python 2.7)
*******************************************************************************
""")