File python-reportlab.spec of Package python-reportlab

#
# spec file for package python-reportlab
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#


%bcond_without tests

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name:           python-reportlab
Version:        3.4.1
Release:        0
Url:            http://www.reportlab.com/
Summary:        The Reportlab Toolkit
License:        BSD-3-Clause
Group:          Development/Languages/Python
Source:         reportlab-%{version}.tar.gz
Patch0:         reportlab-missing-includes.patch
# PATCH-FIX-UPSTREAM drop unneeded requirements https://bitbucket.org/rptlab/reportlab/issues/113
Patch1:         drop-requirements.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  %{python_module Pillow}
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module xml}
BuildRequires:  fdupes
BuildRequires:  freetype2-devel
BuildRequires:  python-rpm-macros
Requires:       python-Pillow
%ifpython2
Obsoletes:      %{oldpython}-ReportLab < %{version}
Provides:       %{oldpython}-ReportLab = %{version}
%endif
%ifpython3
Provides:       python3-ReportLab = %{version}
Obsoletes:      python3-ReportLab < %{version}
%endif
%python_subpackages

%description
The ReportLab Toolkit. An Open Source Python library for generating PDFs and graphics.

%prep
%setup -q -n reportlab-%{version}
%patch0
%patch1 -p1
sed -i "1d" src/reportlab/lib/{formatters,fonts,corp,units,pagesizes,__init__,randomtext,logger,normalDate}.py
sed -i "1d" src/reportlab/graphics/{widgets/table,barcode/test,testdrawings,testshapes}.py # Fix non-executable bits

%build
export CFLAGS="%{optflags}"
%python_build

%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}

%if %{with tests}
%check
export LANG=en_US.UTF-8
%python_exec setup.py tests
%endif

%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE.txt
%doc CHANGES.md README.txt
%{python_sitearch}/reportlab/
%{python_sitearch}/reportlab-%{version}-py*.egg-info

%changelog
* Tue Jul 25 2017 jmatejek@suse.com
- drop-requirements.patch: do not list setuptools and pip in egg-info
  as requirements
  (fixes bsc#1049516, upstream issue https://bitbucket.org/rptlab/reportlab/issues/113 )
- set LANG variable correctly to help with test suite
  * note that test suite is broken, multiple tests fail and this does not stop build
  * causes of failure are spurious though
* Sat May  6 2017 toddrme2178@gmail.com
- Fix Provides/Obsoletes.
* Wed Apr 19 2017 toddrme2178@gmail.com
- Update to 3.4.0
  * We now support SVG as a format for embedded vector graphics.
  * The <barCodeFlowable> and <barCode> tags now support additional
    encodings.
  * We have considerably expanded our support for fillable forms
    within PDF files. The <textField> tag has many more attributes
    <checkboxField>, <radioField>, <choiceField> & <listboxField>
    which along with the new <textField> make possible PDF forms.
  * The <ul> & <ol> tags now support automatic style change for the
    start/type parameter, by using a space separated list fo start
    values
- Implement single-spec version
* Tue Mar 29 2016 dmueller@suse.com
- install LICENSE.txt
* Sat Nov  7 2015 freitag@opensuse.org
- Fixed source download link.
* Fri Jun  5 2015 kkaempf@suse.com
- Update to 3.2.0
  * Added proportional underlining specific to font sizes, set via
    the `underlineProportion` attribute of ParagraphStyles.
  * TrueType fonts: added support for cmaps 10 & 13
  * DocTemplate class now supports a boolean `displayDocTitle` argument.
  * TableofContents now supports a formatter argument to allow
    formatting of the displayed page numbers (eg for appendices etc).
  * Table `repeatRows` can now be a tuple of row numbers to allow
    incomplete ranges of rows to be repeated.
  * Tables now do pass instance.`spaceBefore` & `spaceAfter` to
    their split children when split
  * Several strangenesses were fixed in the pdfbase.pdfform module;
    Multiple usage is now allowed.
  * Error message fixes
  * Various environment fixes for Google Application Environment
  * Resource fixes
  * PDFDoc can now set the `Lang` attribute
  * canvas.drawString and similar now allow the character spacing
    to be set
  * Index of accented stuff has been improved
  * RTL code was improved
  * fix Propertyset.clone
  * `flowables.py`: fix ImageAndFlowables so it avoids testing
    negative availableWidth
* Fri Jun  5 2015 kkaempf@suse.com
- Update to 3.1
  * support for emoji
  * improved pip-based installers
* Fri Jun  5 2015 kkaempf@suse.com
- Update to 3.0
  * ReportLab 3.0 now supports Python 2.7, 3.3 and higher.
  * There has been a substantial internal rewrite to ensure
    consistent use of unicode strings for natural-language text,
    and of bytes for all file format internals.
  * Python 3.x compatibility
  * New features
  - Add ability to output greyscale and 1-bit PIL images without
    conversion to RGB. (contributed by Matthew Duggan)
  - highlight annotation (contributed by Ben Echols)
  * Other
  - numerous very minor fixes, visible through BitBucket.
* Sun Nov 24 2013 kkaempf@suse.com
- Update to version 2.7
  * Charts / graphics enhancements
  - Added SimpleTimeSeriesPlot
  - added _computeMaxSpace
  - added in lineStyle (for bars)
  - improved SVG rendering
  - Pie Chart now has an `innerRadiusFraction` to allow doughnut-like
    appearance for 2d charts
  * Charts/graphics bug fixes
  - piecharts.py: fix Pie3d __init__ to call its superclass
  - linecharts.py: fix swatch creation
  - fixed `y` axis in the simple time series plot
  * PDF
  - Fixes to testshapes & pdfform resetting
  - colors.py
  - various minor fixes
  * Platypus
  - Defined a small bullet rather than a big circle as the default for unordered lists
  - fixed attribute spelling bug
  - fixed CJK + endDots
* Sun Nov 24 2013 p.drouand@gmail.com
- Update to version 2.7
  + No relative ChangeLog entry
* Thu Jan 24 2013 p.drouand@gmail.com
- Update to version 2.6:
  * General changes
  - Manuals have been reformatted with more pleasing code snippets and tables of
    contents, and reviewed and expanded
  * Flowing documents (Platypus):
  - Added support for HTML-style list objects
  - Added flexible mechanism for drawing bullets
  - Allowed XPreformatted objects to use Asian line wrapping
  - Added an 'autoNextPageTemplate' attribute to PageTemplates.  For example you
    can now set up a 'chapter first page template' which will always be followed
    by a 'continuation template' on the next page break, saving the programmer from
    having to issue control flow commands in the story.
  - added a TopPadder flowable, which will 'wrap' another Flowable and move it
    to the bottom of the current page.
  - More helpful error messages when large tables cannot be rendered
  - Documentation for images within text (test_032_images)
  - Trailing dots for use on contents pages
  * Charts and graphics:
  - Support for UPCA bar codes
  - We now have a semi-intelligent system for labelling pie charts with
    callout lines.  Thanks to James Martin-Collar, a maths student at Warwick
    University, who did this as his summer internship.
  - Axes - added startOffset and endOffset properties; allowed for axis
    background annotations.
  - Bar charts - allow more control of z Index (i.e. drawing order of axes and
    lines)
  - Pie charts - fixed bugs in 3d appearance
  - SVG output back end has seen some bugs fixed and now outputs resizeable SVG
* Fri May 25 2012 toddrme2178@gmail.com
- Clean up spec file
* Thu Dec  8 2011 coolo@suse.com
- fix license to be in spdx.org format
* Tue Sep 20 2011 saschpe@suse.de
- Fix non-executable bit rpmlint warning
* Mon May 30 2011 alexandre@exatati.com.br
- Add Provides and Obsoletes to python-ReportLab in spec file to
  better behaviour in 11.1.
* Tue Apr 12 2011 alexandre@exatati.com.br
- Update to 2.5:
  - Please readme CHANGES.txt.
- Regenerate spec file with py2pack;
- Add CHANGES.txt and README.txt files as documentation;
- Bzip2 source code.
* Thu Jan 21 2010 alexandre@exatati.com.br
- Update to 2.4.
* Mon Dec 28 2009 alexandre@exatati.com.br
- New ReportLab package (2.3) for openSUSE, now in d:l:py.
openSUSE Build Service is sponsored by