add tests
This commit is contained in:
parent
824d1343cf
commit
5b7a65724a
6 changed files with 365 additions and 2 deletions
|
|
@ -1,18 +1,29 @@
|
|||
%global pypi_name pdfkit
|
||||
%global commit0 d1c218ab4bb9e4c3790638070ad41bec6077537e
|
||||
%global testurl https://raw.githubusercontent.com/JazzCore/python-pdfkit/%{commit0}/tests/
|
||||
|
||||
Name: python-%{pypi_name}
|
||||
Version: 0.5.0
|
||||
Release: 17%{?dist}
|
||||
Release: 18%{?dist}
|
||||
Summary: Wkhtmltopdf python wrapper
|
||||
|
||||
License: MIT
|
||||
URL: https://github.com/JazzCore/python-pdfkit
|
||||
Source0: https://pypi.python.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.zip
|
||||
|
||||
# tests taken from github due to not part of pypi
|
||||
Source10: %{testurl}/pdfkit-tests.py
|
||||
Source11: %{testurl}/fixtures/example.css
|
||||
Source12: %{testurl}/fixtures/example.html
|
||||
Source13: %{testurl}/fixtures/example2.css
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3
|
||||
BuildRequires: python3-pytest
|
||||
BuildRequires: wkhtmltopdf
|
||||
|
||||
Requires: python3
|
||||
Requires: wkhtmltopdf
|
||||
|
||||
|
|
@ -26,6 +37,7 @@ This is an adapted version of Ruby PDFKit.
|
|||
%package -n python3-%{pypi_name}
|
||||
Summary: Wkhtmltopdf python wrapper
|
||||
%{?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.
|
||||
|
||||
|
|
@ -42,6 +54,12 @@ rm -rf %{pypi_name}.egg-info
|
|||
%install
|
||||
%py3_install
|
||||
|
||||
%check
|
||||
mkdir -p tests/fixtures
|
||||
cp -t tests %{SOURCE10}
|
||||
cp -t tests/fixtures %{SOURCE11} %{SOURCE12} %{SOURCE13}
|
||||
%{__python3} setup.py test
|
||||
|
||||
%files -n python3-%{pypi_name}
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license LICENSE
|
||||
|
|
@ -50,6 +68,9 @@ rm -rf %{pypi_name}.egg-info
|
|||
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
||||
|
||||
%changelog
|
||||
* Mon Mar 16 2020 Raphael Groner <projects.rg@smart.ms> - 0.5.0-18
|
||||
- add tests
|
||||
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-17
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue