Name: weasyprint
Version: 0.19.2
Release: 3%{?dist}
Group: Applications/File
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}.tar.gz
# Fedora specific patch to remove use of /usr/bin/env in shebang in scripts
Patch0: weasyprint-0.19.2-shebang.patch
BuildRequires: python2-devel python-setuptools
Requires: python-weasyprint = %{version}-%{release}
%description
WeasyPrint can render HTML and CSS to PDF. It aims to support web standards
for printing.
%package -n python-weasyprint
Group: Development/Libraries
Summary: Python library to render HTML and CSS to PDF
Requires: python-tinycss python-cssselect python-pyphen
Requires: python-cairocffi python-cairosvg
%description -n python-weasyprint
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
%build
%{__python} setup.py build
%install
%{__python} setup.py install --skip-build --prefix=%{_prefix} --root %{buildroot}
chmod +x %{buildroot}%{python_sitelib}/weasyprint/tests/test_web/run.py
%files
%doc AUTHORS LICENSE README
%{_bindir}/weasyprint
%files -n python-weasyprint
%doc AUTHORS CHANGES LICENSE README
%{python_sitelib}/*
%changelog
* Sun Jul 28 2013 Eric Smith <brouhaha@fedoraproject.org> 0.19.2-3
- Remove /usr/bin/env from Python script shebang lines.
* Sun Jul 21 2013 Eric Smith <brouhaha@fedoraproject.org> 0.19.2-2
- Fixed dependencies.
* Sat Jul 20 2013 Eric Smith <brouhaha@fedoraproject.org> 0.19.2-1
- initial version