1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-05 08:27:22 +03:00
WeasyPrint/setup.py

74 lines
2.1 KiB
Python
Raw Normal View History

# coding: utf8
2011-04-20 13:15:13 +04:00
"""
WeasyPrint
==========
2011-04-20 13:15:13 +04:00
WeasyPrint converts web documents to PDF.
2011-04-20 13:15:13 +04:00
:copyright: Copyright 2011-2012 Simon Sapin and contributors, see AUTHORS.
:license: BSD, see LICENSE for details.
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
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',
'tinycss==0.3',
2012-04-25 21:05:42 +04:00
'cssselect>=0.6',
'CairoSVG>=0.4.1',
# ... 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:
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,
url='http://weasyprint.org/',
license='BSD',
2011-04-20 13:15:13 +04:00
description='WeasyPrint converts web documents to PDF.',
long_description=LONG_DESCRIPTION,
2011-11-02 12:52:17 +04:00
author='Simon Sapin',
author_email='simon.sapin@kozea.fr',
classifiers=[
'Development Status :: 5 - Production/Stable',
2011-11-02 12:52:17 +04:00
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
2011-11-02 12:52:17 +04:00
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
2012-09-20 18:29:33 +04:00
'Programming Language :: Python :: 3.1',
'Programming Language :: Python :: 3.2',
2011-11-02 12:52:17 +04:00
'Topic :: Internet :: WWW/HTTP',
'Topic :: Text Processing :: Markup :: HTML',
'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/*/*'],
'weasyprint.css': ['*.css']},
2011-04-20 13:15:13 +04:00
zip_safe=False,
install_requires=REQUIREMENTS,
test_suite='weasyprint.tests',
entry_points={
2011-08-09 14:45:51 +04:00
'console_scripts': [
'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
)