Skip to content

Setup using pip broken since CairoSVG dropped Python 2 support #394

Description

@KarelJakubec

Hi Kozea,
I am experiencing problems with installing WeasyPrint 0.32 into my python 2.7.12 virtualenv using pip. It is caused by new release of CairoSVG (2.0), which setup fails cause it no longer supports Python 2.

Problem seems to be in METADATA file which contains dependency on cairosvg >= 1.0.20. This automatically downloads CairoSVG 2.0 and so it fails.

Metadata-Version: 2.0
Name: WeasyPrint
Version: 0.32
Summary: WeasyPrint converts web documents to PDF.
Home-page: http://weasyprint.org/
Author: Simon Sapin
Author-email: simon.sapin@kozea.fr
License: BSD
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Text Processing :: Markup :: HTML
Classifier: Topic :: Multimedia :: Graphics :: Graphics Conversion
Classifier: Topic :: Printing
Requires-Dist: CairoSVG (>=1.0.20)
Requires-Dist: Pyphen (>=0.8)
Requires-Dist: cairocffi (>=0.5)
Requires-Dist: cffi (>=0.6)
Requires-Dist: cssselect (>=0.6)
Requires-Dist: html5lib (>=0.999999999)
Requires-Dist: lxml (>=3.0)
Requires-Dist: tinycss (>=0.4)

I've seen that there is already a patch solving this problem in setup.py, which should limit the CairoSVG version to 1.0.20 but somehow it is not applied in package in PyPI. I would suggest that the package was built in Python 3 environment and so the extra dependency was therefore skipped. However I am not an expert on Python packaging so I am not sure if such a scenario is even possible.

The workaround to make things working is to set CairoSVG==1.0.20 in your requirements.txt file (or whenever you store packages your projects) which should effectively freeze it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugExisting features not working as expected

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions