diff --git a/weasyprint.spec b/weasyprint.spec index 999b6fd..a34663e 100644 --- a/weasyprint.spec +++ b/weasyprint.spec @@ -1,17 +1,15 @@ Name: weasyprint Version: 0.39 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Utility to render HTML and CSS to PDF License: BSD URL: http://weasyprint.org/ BuildArch: noarch -Source0: https://github.com/Kozea/WeasyPrint/archive/v%{version}/%{name}-%{version}.tar.gz - -# Fedora specific patch to remove use of /usr/bin/env in shebang in scripts -Patch0: weasyprint-0.39-shebang.patch +Source0: %pypi_source Requires: python3-weasyprint = %{version}-%{release} BuildRequires: python3-devel python3-setuptools +BuildRequires: /usr/bin/pathfix.py %description WeasyPrint can render HTML and CSS to PDF. It aims to support web standards @@ -29,6 +27,10 @@ Requires: python3-lxml >= 3.0 Requires: python3-pyphen >= 0.8 Requires: python3-setuptools Requires: python3-tinycss2 >= 0.5 +# workaround for bug 1685654 +# actually python3-cairocffi should have that dependency (see bug 1698217) but +# for now just add the requirement here. +Requires: python3-xcffib # Weasyprint will fail if no fonts are installed. There's no way to know # what fonts the user would actually want, but require a few common ones # that might be useful: @@ -42,13 +44,13 @@ The WeasyPrint Python library is a rendering engine for HTML and CSS that can export to PDF. It aims to support web standards for printing. %prep -%setup -q -n WeasyPrint-%{version} -%patch0 -p1 -b .shebang - -find . -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|' +%autosetup -p1 -n WeasyPrint-%{version} +pathfix.py -pni "%{__python3} %{py3_shbang_opts}" . %build %py3_build +# do not ship tests +rm -rf weasyprint/tests %install %py3_install @@ -66,6 +68,10 @@ chmod +x %{buildroot}%{python3_sitelib}/weasyprint/tests/test_web/run.py %{python3_sitelib}/weasyprint/ %changelog +* Tue May 28 2019 Felix Schwarz 0.39-2 +- avoid dependency on Python 3.3 +- require python3-xcffib directly (#1685654) + * Tue Apr 30 2019 Eric Smith 0.39-1 - Update to newer (but not latest) upstream.