1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-05 16:37:47 +03:00
WeasyPrint/setup.py
Guillaume Ayoub f53334ba0a Officially drop support of Python 2.6, 3.1 and 3.2
These old versions are not supported anymore since February 2016 for 3.2
and October 2013 (!) for 2.6. It's becoming even hard to use and to
test, as more and more libraries and tools (flake8 for example) decide
to drop the support of these versions too.
2016-07-28 18:25:12 +02:00

82 lines
2.3 KiB
Python

# coding: utf-8
"""
WeasyPrint
==========
WeasyPrint converts web documents to PDF.
:copyright: Copyright 2011-2014 Simon Sapin and contributors, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
import sys
import codecs
from os import path
from setuptools import setup, find_packages
VERSION = re.search("VERSION = '([^']+)'", codecs.open(
path.join(path.dirname(__file__), 'weasyprint', '__init__.py'),
encoding="utf-8",
).read().strip()).group(1)
LONG_DESCRIPTION = open(path.join(path.dirname(__file__), 'README.rst')).read()
REQUIREMENTS = [
# XXX: Keep this in sync with docs/install.rst
'lxml>=3.0',
'html5lib>=0.999999999',
'tinycss==0.3',
'cssselect>=0.6',
'cffi>=0.6',
'cairocffi>=0.5',
'Pyphen>=0.8'
# C dependencies: Gdk-Pixbuf (optional), Pango, cairo.
]
if sys.version_info < (3,):
REQUIREMENTS.append('CairoSVG >= 1.0.20, < 2')
else:
REQUIREMENTS.append('CairoSVG >= 1.0.20')
setup(
name='WeasyPrint',
version=VERSION,
url='http://weasyprint.org/',
license='BSD',
description='WeasyPrint converts web documents to PDF.',
long_description=LONG_DESCRIPTION,
author='Simon Sapin',
author_email='simon.sapin@kozea.fr',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Text Processing :: Markup :: HTML',
'Topic :: Multimedia :: Graphics :: Graphics Conversion',
'Topic :: Printing',
],
packages=find_packages(),
package_data={
'weasyprint.hyphenation': ['*.dic'],
'weasyprint.tests': ['resources/*.*', 'resources/*/*'],
'weasyprint.css': ['*.css']},
zip_safe=False,
install_requires=REQUIREMENTS,
test_suite='weasyprint.tests',
entry_points={
'console_scripts': [
'weasyprint = weasyprint.__main__:main',
],
},
)