14
0

Accepting request 870103 from home:jayvdb:branches:devel:languages:python

- Add missing runtime dependency on setuptools
- Remove hashbang from library modules
- Activate test suite
- Update to v0.2.5

OBS-URL: https://build.opensuse.org/request/show/870103
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-xhtml2pdf?expand=0&rev=17
This commit is contained in:
2021-02-07 18:58:31 +00:00
committed by Git OBS Bridge
parent fb6e196689
commit 2e3c98497c
4 changed files with 50 additions and 15 deletions

View File

@@ -1,3 +1,32 @@
-------------------------------------------------------------------
Sun Feb 7 14:49:02 UTC 2021 - John Vandenberg <jayvdb@gmail.com>
- Add missing runtime dependency on setuptools
- Remove hashbang from library modules
- Activate test suite
- Update to v0.2.5
* Added Asian fonts support (Simplified Chinese,
Traditional Chinese, Japanese & Korean)
* Added support for right-to-left writings like Arabic, Hebrew,
Persian, Pashto, Urdu and Sindhi. Simply include for example
<pdf:language name="arabic"/>
* CSS property letter-spacing now supports float values and
relative & absolute units like cm, in, em, % etc
* Added unit tests for Asian and right-to-left fonts
* @frame properties like width, right, bottom etc. are now
correctly calculated depending on the page orientation and size
* Fixed support for multiple fonts and unicode
* Fixed an encoding issue with html5lib
* Fixed a problem with the border property in h1 to h6 heading tags
* Fixed compability with ReportLab 3.5.X
* Removed default background-image when no background-image is defined
* Fixed an issue with different font type that have the same name
* Fixed a bug that prevented support for Python 3.X
* testrender test: fixed transparences and included new reference
files. now all tests pass in Travis CI without --failed
* 0.0 as value for a CSS property now acts the same way as 0 and None
* Removed i and inch as unofficial synonyms for the in unit
-------------------------------------------------------------------
Fri May 15 12:56:36 UTC 2020 - Petr Gajdos <pgajdos@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-xhtml2pdf
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,28 +18,33 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-xhtml2pdf
Version: 0.2.4
Version: 0.2.5
Release: 0
Summary: PDF Generator Using HTML and CSS
License: Apache-2.0
Group: Development/Languages/Python
URL: https://github.com/xhtml2pdf/xhtml2pdf
Source: https://files.pythonhosted.org/packages/source/x/xhtml2pdf/xhtml2pdf-%{version}.tar.gz
# leaving the requirements here as the tests will start working one day
BuildRequires: %{python_module Pillow >= 2.0}
BuildRequires: %{python_module PyPDF2 >= 1.26}
BuildRequires: %{python_module coverage}
BuildRequires: %{python_module html5lib >= 1.0}
BuildRequires: %{python_module nose >= 1.3.3}
BuildRequires: %{python_module reportlab >= 3.0}
Source: https://github.com/xhtml2pdf/xhtml2pdf/archive/%{version}.tar.gz#/xhtml2pdf-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
# SECTION test requirements
BuildRequires: %{python_module Pillow >= 7.0.2}
BuildRequires: %{python_module PyPDF2 >= 1.26}
BuildRequires: %{python_module arabic-reshaper >= 2.1.0}
BuildRequires: %{python_module html5lib >= 1.0}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-bidi >= 0.4.2}
BuildRequires: %{python_module reportlab >= 3.0}
BuildRequires: %{python_module six}
# /SECTION
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Pillow >= 2.0.0
Requires: python-Pillow >= 7.0.2
Requires: python-PyPDF2 >= 1.26
Requires: python-arabic-reshaper >= 2.1.0
Requires: python-html5lib >= 1.0
Requires: python-python-bidi >= 0.4.2
Requires: python-reportlab >= 3.0
Requires: python-setuptools
Requires: python-six
Requires(post): update-alternatives
Requires(postun): update-alternatives
@@ -57,6 +62,7 @@ able to generate PDF templates very quickly without learning new technologies.
%prep
%setup -q -n xhtml2pdf-%{version}
sed -i '1{/^#!/d}' xhtml2pdf/paragraph.py xhtml2pdf/w3c/*.py
%build
%python_build
@@ -68,7 +74,7 @@ able to generate PDF templates very quickly without learning new technologies.
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# as in setup.py: test_suite = "tests", They're not even working yet
%pytest
%post
%python_install_alternative xhtml2pdf

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6793fbbdcb6bb8a4a70132966d8d95e95ea3498cdf0e82252d2b8e9aae34fcb5
size 98624

3
xhtml2pdf-0.2.5.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6cb3ff827861bc53e88a5ff99fe6b166dabe2861a7bc51f0817009436a7dd4b8
size 4910736