15
0
forked from pool/python-fpdf2
Files
python-fpdf2/python-fpdf2.spec
Markéta Machová 350fef267b Accepting request 1243026 from home:glaubitz:branches:devel:languages:python
- Update to 2.8.2
  * Added
    - new optional parameter `border` for table cells: users can define
      specific borders (left, right, top, bottom) for individual cells
    - `FPDF.write_html()`: now parses `<title>` tags to set the document title.
      By default, it is added as PDF metadata, but not rendered in the document
      body. However, this can be enabled by passing `render_title_tag=True` to
      `FPDF.write_html()`.
    - support for LZWDecode compression
    - Python 3.13 is now officially supported
    - support for page labels and created a reference table of contents implementation
    - documentation on how to: render spreadsheets as PDF tables
    - support for passing `Align` values (along with string values like `'C'`,
      `'L'`, `'R'`) in `l_margin` of `TextStyle` to horizontally align text
  * Fixed
    - support for `align=` in `FPDF.table()`. Due to this correction, tables are now
      properly horizontally aligned on the page by default. This was always specified
      in the documentation, but was not in effect until now. You can revert to have
      left-aligned tables by passing `align="LEFT"` to `FPDF.table()`.
    - `FPDF.set_text_shaping(False)` was broken since version 2.7.8 and is now working properly
    - fixed bug where cells with `rowspan`, `colspan` > 1 and null text were not displayed properly
    - `CreationDate` metadata used a wrong timezone offset for UTC
    - `insert_toc_placeholder()`] did not properly set the page orientation, which
      caused a bug when the last page of the document was in a different orientation
  * Changed
    - improved logic for handling text substitution of the total number of pages,
      ensuring compatibility with text shaping
    - all `AnnotationDict` properties can now be passed to `FPDF.text_annotation()`,
      `FPDF.free_text_annotation()`,  `FPDF.add_action()`, `FPDF.add_text_markup_annotation()`
      & `FPDF.ink_annotation()`. This includes `title`, `color`, `border_width`...

OBS-URL: https://build.opensuse.org/request/show/1243026
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fpdf2?expand=0&rev=5
2025-02-04 13:55:30 +00:00

84 lines
2.7 KiB
RPMSpec

#
# spec file for package python-fpdf2
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-fpdf2
Version: 2.8.2
Release: 0
Summary: Simple & fast PDF generation for Python
License: LGPL-3.0-or-later
URL: https://py-pdf.github.io/fpdf2/
# The _service download the source and repack without some ttf files
# that has non-commercial license. boo#1232452
Source: fpdf2-%{version}.tar.xz
BuildRequires: %{python_module Pillow >= 6.2.2}
BuildRequires: %{python_module defusedxml}
BuildRequires: %{python_module fonttools >= 4.34.0}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module pytest >= 4.0}
BuildRequires: %{python_module camelot-py}
BuildRequires: %{python_module cryptography}
BuildRequires: %{python_module endesive}
BuildRequires: %{python_module ghostscript}
BuildRequires: %{python_module lxml}
BuildRequires: %{python_module opencv}
BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module qrcode}
BuildRequires: %{python_module tabula-py}
BuildRequires: %{python_module uharfbuzz}
BuildRequires: java
# /SECTION
BuildRequires: fdupes
Requires: python-Pillow >= 6.2.2
Requires: python-defusedxml
Requires: python-fonttools >= 4.34.0
BuildArch: noarch
%python_subpackages
%description
Simple & fast PDF generation for Python.
%prep
%autosetup -p1 -n fpdf2-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
donttest="test_png_url or test_bidi_conformance or test_bidi_character or test_page_background or test_insert_jpg_jpxdecode"
# Requires non-commercial licensed file SBL_Hbrw.ttf
donttest+=" or test_bidi_paragraph_direction or test_hebrew_diacritics or test_text_with_parentheses"
%pytest -s -k "not ($donttest)"
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitelib}/fpdf
%{python_sitelib}/fpdf2-%{version}.dist-info
%changelog