forked from Kozea/CairoSVG
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
executable file
·65 lines (56 loc) · 2.22 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
#!/usr/bin/env python
#
# Public Domain
"""
CairoSVG - A Simple SVG Converter Based on Cairo
================================================
CairoSVG is a SVG converter based on Cairo. It can convert SVG files to PDF,
PostScript and PNG files.
For further information, please visit the `CairoSVG Website
<http://cairosvg.org/>`_.
"""
import re
import sys
from os import path
from setuptools import setup
init_path = path.join(path.dirname(__file__), 'cairosvg', '__init__.py')
with open(init_path, 'r', encoding='utf-8') as fd:
version = re.search("__version__ = '([^']+)'", fd.read().strip()).group(1)
needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
pytest_runner = ['pytest-runner'] if needs_pytest else []
# When the version is updated, ``cairosvg.__version__`` must be modified.
# A new section in the ``NEWS`` file must be added too.
setup(
name='CairoSVG',
version=version,
description='A Simple SVG Converter based on Cairo',
long_description=__doc__,
author='Kozea',
author_email='guillaume.ayoub@kozea.fr',
url='http://www.cairosvg.org/',
license='GNU LGPL v3+',
platforms='Any',
packages=['cairosvg'],
provides=['cairosvg'],
setup_requires=pytest_runner,
python_requires='>=3.4',
install_requires=[
'cairocffi', 'cssselect2', 'defusedxml', 'pillow', 'tinycss2'],
tests_require=[
'pytest-cov', 'pytest-flake8', 'pytest-isort', 'pytest-runner'],
extras_require={'test': (
'pytest-runner', 'pytest-cov', 'pytest-flake8', 'pytest-isort')},
keywords=['svg', 'convert', 'cairo', 'pdf', 'png', 'postscript'],
entry_points={'console_scripts': 'cairosvg=cairosvg:main'},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: '
'GNU Lesser General Public License v3 or later (LGPLv3+)',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Multimedia :: Graphics :: Graphics Conversion'])