2012-03-22 02:19:27 +04:00
|
|
|
# coding: utf8
|
2011-04-20 13:15:13 +04:00
|
|
|
"""
|
2012-03-22 02:19:27 +04:00
|
|
|
WeasyPrint
|
|
|
|
==========
|
2011-04-20 13:15:13 +04:00
|
|
|
|
2012-03-22 02:19:27 +04:00
|
|
|
WeasyPrint converts web documents to PDF.
|
2011-04-20 13:15:13 +04:00
|
|
|
|
2012-03-22 02:19:27 +04:00
|
|
|
:copyright: Copyright 2011-2012 Simon Sapin and contributors, see AUTHORS.
|
|
|
|
:license: BSD, see LICENSE for details.
|
2011-04-28 21:15:30 +04:00
|
|
|
|
2011-04-20 13:15:13 +04:00
|
|
|
"""
|
|
|
|
|
2012-02-07 19:11:38 +04:00
|
|
|
import re
|
2012-02-20 18:36:55 +04:00
|
|
|
import sys
|
2012-02-07 19:11:38 +04:00
|
|
|
from os import path
|
2011-10-10 17:20:26 +04:00
|
|
|
from setuptools import setup, find_packages
|
2011-04-20 13:15:13 +04:00
|
|
|
|
2012-09-20 18:29:33 +04:00
|
|
|
VERSION = re.search("VERSION = '([^']+)'", open(
|
|
|
|
path.join(path.dirname(__file__), 'weasyprint', '__init__.py')
|
|
|
|
).read().strip()).group(1)
|
2012-02-07 19:11:38 +04:00
|
|
|
|
2012-09-20 18:29:33 +04:00
|
|
|
LONG_DESCRIPTION = open(path.join(path.dirname(__file__), 'README')).read()
|
2012-02-20 18:36:55 +04:00
|
|
|
|
2012-03-22 02:19:27 +04:00
|
|
|
|
|
|
|
REQUIREMENTS = [
|
2012-09-20 18:29:33 +04:00
|
|
|
# XXX: Keep this in sync with docs/install.rst
|
2012-02-20 18:36:55 +04:00
|
|
|
'lxml',
|
2012-09-18 14:58:35 +04:00
|
|
|
'tinycss==0.3',
|
2012-04-25 21:05:42 +04:00
|
|
|
'cssselect>=0.6',
|
|
|
|
'CairoSVG>=0.4.1',
|
2012-07-29 00:11:28 +04:00
|
|
|
# ... and others, not installable by pip.
|
2012-02-20 18:36:55 +04:00
|
|
|
]
|
2012-03-05 17:59:07 +04:00
|
|
|
if sys.version_info < (2, 7) or (3,) <= sys.version_info < (3, 2):
|
2012-09-20 18:29:33 +04:00
|
|
|
# In the stdlib from 2.7 and 3.2:
|
2012-03-22 02:19:27 +04:00
|
|
|
REQUIREMENTS.append('argparse')
|
2012-02-20 18:36:55 +04:00
|
|
|
|
2011-04-20 13:15:13 +04:00
|
|
|
setup(
|
|
|
|
name='WeasyPrint',
|
2012-02-07 19:11:38 +04:00
|
|
|
version=VERSION,
|
2011-04-28 21:15:30 +04:00
|
|
|
url='http://weasyprint.org/',
|
2012-03-22 02:19:27 +04:00
|
|
|
license='BSD',
|
2011-04-20 13:15:13 +04:00
|
|
|
description='WeasyPrint converts web documents to PDF.',
|
2012-03-22 02:19:27 +04:00
|
|
|
long_description=LONG_DESCRIPTION,
|
2011-11-02 12:52:17 +04:00
|
|
|
author='Simon Sapin',
|
|
|
|
author_email='simon.sapin@kozea.fr',
|
|
|
|
classifiers=[
|
2012-03-22 02:19:27 +04:00
|
|
|
'Development Status :: 5 - Production/Stable',
|
2011-11-02 12:52:17 +04:00
|
|
|
'Intended Audience :: Developers',
|
2012-03-22 02:19:27 +04:00
|
|
|
'License :: OSI Approved :: BSD License',
|
2012-02-22 20:25:03 +04:00
|
|
|
'Programming Language :: Python :: 2',
|
|
|
|
'Programming Language :: Python :: 2.6',
|
2011-11-02 12:52:17 +04:00
|
|
|
'Programming Language :: Python :: 2.7',
|
2012-02-22 20:25:03 +04:00
|
|
|
'Programming Language :: Python :: 3',
|
2012-09-20 18:29:33 +04:00
|
|
|
'Programming Language :: Python :: 3.1',
|
2012-02-22 20:25:03 +04:00
|
|
|
'Programming Language :: Python :: 3.2',
|
2011-11-02 12:52:17 +04:00
|
|
|
'Topic :: Internet :: WWW/HTTP',
|
|
|
|
'Topic :: Text Processing :: Markup :: HTML',
|
2012-03-22 02:19:27 +04:00
|
|
|
'Topic :: Multimedia :: Graphics :: Graphics Conversion',
|
2011-11-02 12:52:17 +04:00
|
|
|
'Topic :: Printing',
|
|
|
|
],
|
2011-10-10 17:20:26 +04:00
|
|
|
packages=find_packages(),
|
|
|
|
package_data={
|
2012-05-04 20:37:53 +04:00
|
|
|
'weasyprint.tests': ['resources/*.*', 'resources/*/*'],
|
2012-02-14 15:49:33 +04:00
|
|
|
'weasyprint.css': ['*.css']},
|
2011-04-20 13:15:13 +04:00
|
|
|
zip_safe=False,
|
2012-03-22 02:19:27 +04:00
|
|
|
install_requires=REQUIREMENTS,
|
|
|
|
test_suite='weasyprint.tests',
|
2011-09-02 19:56:52 +04:00
|
|
|
entry_points={
|
2011-08-09 14:45:51 +04:00
|
|
|
'console_scripts': [
|
2012-02-14 15:49:33 +04:00
|
|
|
'weasyprint = weasyprint.__main__:main',
|
2011-08-09 14:45:51 +04:00
|
|
|
],
|
2011-10-10 18:39:41 +04:00
|
|
|
},
|
2011-04-20 13:15:13 +04:00
|
|
|
)
|