Blob Blame History Raw
%global pypi_name pdfkit

Name:           python-%{pypi_name}
Version:        0.5.0
Release:        2%{?dist}
Summary:        Wkhtmltopdf python wrapper

Group:          Development/Libraries
License:        MIT
URL:            https://github.com/JazzCore/python-pdfkit
Source0:        https://pypi.python.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.zip

BuildArch:      noarch 
BuildRequires:  python-setuptools
BuildRequires:  python2-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-devel
BuildRequires:  python3
Requires:       python3
Requires:       wkhtmltopdf

Requires:       wkhtmltopdf

%description
Python 2 wrapper for wkhtmltopdf utility to convert HTML to PDF using Webkit.

This is an adapted version of Ruby PDFKit.

%package -n python2-%{pypi_name}
Summary:        Wkhtmltopdf python wrapper
Group:          Development/Libraries
%{?python_provide:%python_provide python2-%{pypi_name}}
%description -n python2-%{pypi_name}
Python 2 wrapper for wkhtmltopdf utility to convert HTML to PDF using Webkit.

This is an adapted version of Ruby PDFKit.

%package -n python3-%{pypi_name}
Summary:        Wkhtmltopdf python wrapper
Group:          Development/Libraries
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name}
Python 3 wrapper for wkhtmltopdf utility to convert HTML to PDF using Webkit.

This is an adapted version of Ruby PDFKit.

%prep
%setup -q -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%build
%py2_build
%py3_build

%install
%py2_install
%py3_install

%files -n python2-%{pypi_name}
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc README.rst LICENSE HISTORY.rst
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info

%files -n python3-%{pypi_name}
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc README.rst HISTORY.rst
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info

%changelog
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Thu Sep 17 2015 William Moreno Reyes <williamjmorenor at gmail.com> 
- 0.5.0-1
- Update to 0.5.0
- Update python macros
- Include python 2 and 3 subpackage

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Thu May 14 2015 Fedora <williamjmorenor@gmail.com> 
- 0.4.1-7
- Define %%license macro for el6

* Sun Dec 07 2014 William José Moreno Reyes <williamjmorenor@gmail.com> - 0.4.1-6
- Add %%licence macro

* Sun Oct 19 2014 William José Moreno Reyes <williamjmorenor at gmail.com> - 0.4.1-5
- Fix Python3  dependency

* Thu Oct 16 2014 William José Moreno Reyes <williamjmorenor at gmail.com> - 0.4.1-4
- Fix Python3 macros in %%build 

* Fri Oct 03 2014 William José Moreno Reyes <williamjmorenor at gmail.com> - 0.4.1-3
- Subpackage for Python3

* Tue Sep 30 2014 William José Moreno Reyes <williamjmorenor at gmail.com> - 0.4.1-2
- Fixing %%doc macro

* Sat Sep 20 2014 William José Moreno Reyes <williamjmorenor at gmail.com> - 0.4.1-1
- Initial package.