2011-05-30 15:03:24 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-reportlab
|
|
|
|
|
#
|
2023-01-10 08:36:10 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2011-05-30 15:03:24 +00:00
|
|
|
#
|
|
|
|
|
# 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.
|
2012-02-16 11:27:22 +00:00
|
|
|
|
2019-01-11 13:00:39 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-05-30 15:03:24 +00:00
|
|
|
#
|
|
|
|
|
|
2016-04-22 14:23:38 +00:00
|
|
|
|
2023-07-27 13:30:23 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2017-04-28 08:42:37 +00:00
|
|
|
Name: python-reportlab
|
2023-11-27 18:39:04 +00:00
|
|
|
Version: 4.0.7
|
2011-09-26 08:17:27 +00:00
|
|
|
Release: 0
|
2011-05-30 15:03:24 +00:00
|
|
|
Summary: The Reportlab Toolkit
|
2016-04-22 14:23:38 +00:00
|
|
|
License: BSD-3-Clause
|
2019-11-19 20:47:54 +00:00
|
|
|
URL: https://www.reportlab.com/
|
2019-05-21 16:34:09 +00:00
|
|
|
Source0: https://files.pythonhosted.org/packages/source/r/reportlab/reportlab-%{version}.tar.gz
|
|
|
|
|
Source1: encryption.gif
|
2023-01-10 08:36:10 +00:00
|
|
|
BuildRequires: %{python_module Pillow >= 9.0.0}
|
2017-04-28 08:42:37 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2017-08-08 09:59:11 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: freetype2-devel
|
|
|
|
|
BuildRequires: python-rpm-macros
|
2023-01-10 08:36:10 +00:00
|
|
|
Requires: python-Pillow >= 9.0.0
|
2021-02-12 13:55:49 +00:00
|
|
|
Provides: python-ReportLab = %{version}
|
|
|
|
|
Obsoletes: python-ReportLab < %{version}
|
2017-05-22 08:46:28 +00:00
|
|
|
%ifpython2
|
|
|
|
|
Obsoletes: %{oldpython}-ReportLab < %{version}
|
|
|
|
|
Provides: %{oldpython}-ReportLab = %{version}
|
|
|
|
|
%endif
|
2023-10-04 14:08:55 +00:00
|
|
|
BuildArch: noarch
|
2017-04-28 08:42:37 +00:00
|
|
|
%python_subpackages
|
2011-05-30 15:03:24 +00:00
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
The ReportLab Toolkit. An Open Source Python library for generating PDFs and graphics.
|
|
|
|
|
|
|
|
|
|
%prep
|
2023-01-10 08:36:10 +00:00
|
|
|
%autosetup -p1 -n reportlab-%{version}
|
2016-04-22 14:23:38 +00:00
|
|
|
sed -i "1d" src/reportlab/lib/{formatters,fonts,corp,units,pagesizes,__init__,randomtext,logger,normalDate}.py
|
2011-09-26 08:17:27 +00:00
|
|
|
sed -i "1d" src/reportlab/graphics/{widgets/table,barcode/test,testdrawings,testshapes}.py # Fix non-executable bits
|
2011-05-30 15:03:24 +00:00
|
|
|
|
|
|
|
|
%build
|
2017-04-28 08:42:37 +00:00
|
|
|
export CFLAGS="%{optflags}"
|
2020-09-29 06:06:12 +00:00
|
|
|
%python_build --no-download-t1-files
|
2011-05-30 15:03:24 +00:00
|
|
|
|
2023-02-16 23:33:52 +00:00
|
|
|
mypython=%{expand:%%__%(pythons="%{pythons}"; echo ${pythons##python* })}
|
2023-10-04 14:08:55 +00:00
|
|
|
PYTHONPATH=$(readlink -f build/lib/) \
|
2023-02-16 23:33:52 +00:00
|
|
|
$mypython docs/genAll.py
|
2020-01-18 19:17:05 +00:00
|
|
|
|
2011-05-30 15:03:24 +00:00
|
|
|
%install
|
2017-04-28 08:42:37 +00:00
|
|
|
%python_install
|
2023-10-04 14:08:55 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2011-05-30 15:03:24 +00:00
|
|
|
|
|
|
|
|
%check
|
2019-01-11 13:00:39 +00:00
|
|
|
export CFLAGS="%{optflags}"
|
2017-08-08 09:59:11 +00:00
|
|
|
export LANG=en_US.UTF-8
|
2019-01-11 13:00:39 +00:00
|
|
|
pushd tests
|
2019-05-21 16:34:09 +00:00
|
|
|
# make online tests offline
|
|
|
|
|
cp %{SOURCE1} .
|
|
|
|
|
sed -i 's@http://www.reportlab.com/rsrc/@@' test_*.py
|
|
|
|
|
###
|
2023-10-04 14:08:55 +00:00
|
|
|
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
2021-11-16 20:50:03 +00:00
|
|
|
$python runAll.py --verbosity=2
|
2019-01-11 13:00:39 +00:00
|
|
|
}
|
2011-05-30 15:03:24 +00:00
|
|
|
|
2017-04-28 08:42:37 +00:00
|
|
|
%files %{python_files}
|
2023-10-04 14:08:55 +00:00
|
|
|
%license LICENSE
|
2020-01-18 19:17:05 +00:00
|
|
|
%doc CHANGES.md README.txt docs/reportlab-userguide.pdf
|
2023-10-04 14:08:55 +00:00
|
|
|
%{python_sitelib}/reportlab/
|
|
|
|
|
%{python_sitelib}/reportlab-%{version}-py*.egg-info
|
2011-05-30 15:03:24 +00:00
|
|
|
|
|
|
|
|
%changelog
|