diff --git a/weasyprint.spec b/weasyprint.spec index 999b6fd..a62289a 100644 --- a/weasyprint.spec +++ b/weasyprint.spec @@ -5,7 +5,7 @@ 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 +Source0: %pypi_source # Fedora specific patch to remove use of /usr/bin/env in shebang in scripts Patch0: weasyprint-0.39-shebang.patch @@ -42,9 +42,7 @@ 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 - +%autosetup -p1 -n WeasyPrint-%{version} find . -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|' %build