09fec3e
%global cmapdir %(echo `rpm -qls ghostscript | grep CMap | awk '{print $2}'`)
ccbfc81
%global pypi reportlab
09fec3e
ccbfc81
Name:           python-%{pypi}
1b7f96d
Version:        3.4.0
e6fc0de
Release:        9%{?dist}
ccbfc81
Summary:        Library for generating PDFs and graphics
09fec3e
License:        BSD
e6fc0de
URL:            https://www.reportlab.com/opensource/
ccbfc81
Source0:        https://pypi.python.org/packages/source/r/%{pypi}/%{pypi}-%{version}.tar.gz
910db02
# https://bitbucket.org/rptlab/reportlab/commits/0fbf25e4857423f6a38ca7f5aeee1c84acaa3fc1
910db02
Patch0001:      0fbf25e4857423f6a38ca7f5aeee1c84acaa3fc1.patch
ccbfc81
ccbfc81
%package -n     python2-%{pypi}
ccbfc81
Summary:        Library for generating PDFs and graphics
198d499
BuildRequires:  gcc
09fec3e
BuildRequires:  freetype-devel
09fec3e
BuildRequires:  ghostscript
09fec3e
BuildRequires:  python2-devel
646ea84
BuildRequires:  python2-pillow
fd8339f
BuildRequires:  libart_lgpl-devel
ccbfc81
09fec3e
Requires:       dejavu-sans-fonts
646ea84
Requires:       python2-pillow
ccbfc81
%{?python_provide:%python_provide python2-%{pypi}}
cvsextras 10e2495
ccbfc81
%package -n     python3-%{pypi}
ccbfc81
Summary:        Library for generating PDFs and graphics
09fec3e
BuildRequires:  python3-devel
09fec3e
BuildRequires:  python3-pillow
ccbfc81
09fec3e
Requires:       dejavu-sans-fonts
09fec3e
Requires:       python3-pillow
ccbfc81
%{?python_provide:%python_provide python3-%{pypi}}
09fec3e
ccbfc81
%description -n python2-%{pypi}
ccbfc81
This is the ReportLab PDF Toolkit. It allows rapid creation of rich PDF
ccbfc81
documents, and also creation of charts in a variety of bitmap and vector
ccbfc81
formats.
ccbfc81
ccbfc81
%description
ccbfc81
This is the ReportLab PDF Toolkit. It allows rapid creation of rich PDF
ccbfc81
documents, and also creation of charts in a variety of bitmap and vector
ccbfc81
formats.
ccbfc81
ccbfc81
%description -n python3-%{pypi}
09fec3e
This is the ReportLab PDF Toolkit. It allows rapid creation of rich PDF 
09fec3e
documents, and also creation of charts in a variety of bitmap and vector 
09fec3e
formats.
09fec3e
09fec3e
%package        doc
09fec3e
Summary:        Documentation for %{name}
09fec3e
BuildArch:      noarch
09fec3e
Requires:       %{name} = %{version}-%{release}
09fec3e
Obsoletes:      %{name}-docs < %{version}-%{release}
09fec3e
09fec3e
%description    doc                  
c2a34e3
Contains the documentation for ReportLab.
e34f304
cvsextras 10e2495
%prep
910db02
%autosetup -n reportlab-%{version} -p1
c2a34e3
# clean up hashbangs from libraries
c2a34e3
find src -name '*.py' | xargs sed -i -e '/^#!\//d'
09fec3e
# patch the CMap path by adding Fedora ghostscript path before the match
09fec3e
sed -i '/\~\/\.local\/share\/fonts\/CMap/i''\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ '\'%{cmapdir}\''\,' src/reportlab/rl_settings.py
09fec3e
rm -rf %{py3dir}
09fec3e
cp -a . %{py3dir}
cvsextras 10e2495
cvsextras 10e2495
%build
ccbfc81
CFLAGS="%{optflags}" %py2_build
09fec3e
pushd %{py3dir}
ccbfc81
CFLAGS="%{optflags}" %py3_build
09fec3e
popd
ccbfc81
c2a34e3
# a bit of a horrible hack due to a chicken-and-egg problem. The docs
c2a34e3
# require reportlab, which isn't yet installed, but is at least built.
09fec3e
PYTHONPATH="`pwd`/`ls -d build/lib*`" %{__python2} docs/genAll.py
cvsextras 10e2495
cvsextras 10e2495
%install
ccbfc81
%py2_install
09fec3e
pushd %{py3dir}
ccbfc81
%py3_install
09fec3e
popd
ccbfc81
234b1a0
# Remove bundled fonts
09fec3e
rm -rf %{buildroot}%{python2_sitearch}/reportlab/fonts
cvsextras 10e2495
09fec3e
%check
ccbfc81
%{__python2} setup.py tests
ccbfc81
pushd %{py3dir}
ccbfc81
%{__python3} setup.py tests
ccbfc81
popd
cvsextras 10e2495
ccbfc81
%files -n python2-%{pypi}
ccbfc81
%doc README.txt CHANGES.md 
ccbfc81
%license LICENSE.txt
09fec3e
%{python2_sitearch}/reportlab/
09fec3e
%{python2_sitearch}/reportlab-%{version}-py%{python2_version}.egg-info
e34f304
ccbfc81
%files -n python3-%{pypi}
ccbfc81
%doc README.txt CHANGES.md 
ccbfc81
%license LICENSE.txt
09fec3e
%{python3_sitearch}/reportlab/
09fec3e
%{python3_sitearch}/reportlab-%{version}-py%{python3_version}.egg-info
cvsextras 10e2495
09fec3e
%files doc
09fec3e
%doc demos/ tools/
09fec3e
#%doc docs/*.pdf
cvsextras 10e2495
cvsextras 10e2495
%changelog
e6fc0de
* Sun Oct 28 2018 William Moreno Reyes <williamjmorenor@gmail.com> - 3.4.0-9
e6fc0de
- Update url 
e6fc0de
  See: https://bugzilla.redhat.com/show_bug.cgi?id=1622664
e6fc0de
910db02
* Thu Aug 23 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 3.4.0-8
910db02
- Correct egg-info dependency information
910db02
6e16a55
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.0-7
6e16a55
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
6e16a55
8a5099b
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 3.4.0-6
8a5099b
- Rebuilt for Python 3.7
8a5099b
f6b26ff
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.0-5
f6b26ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
f6b26ff
7b78381
* Tue Oct 24 2017 williamjmorenor@gmail.com - 3.4.0-4
7b78381
- Adjust requirements
7b78381
26bd2ab
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.0-3
26bd2ab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
26bd2ab
af72e58
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.0-2
af72e58
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
af72e58
1b7f96d
* Tue Jun 06 2017 William Moreno <williamjmorenor@gmail.com> - 3.4.0-1
1b7f96d
- Update to 3.4.0 upstream release
1b7f96d
033d3b6
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.0-4
033d3b6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
033d3b6
ad83b85
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 3.3.0-3
ad83b85
- Rebuild for Python 3.6
ad83b85
fa9647c
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.0-2
fa9647c
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
fa9647c
df269cd
* Sat Apr 09 2016 William Moreno <williamjmorenor@gmail.com> - 3.3.0-1
df269cd
- Update to v3.3.0
df269cd
- Update python macros
df269cd
- Enable %%test
df269cd
- Use license macro
df269cd
- Provide python2 subpackage
df269cd
787e8de
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-3
787e8de
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
787e8de
a45d1b6
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.0-2
a45d1b6
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
a45d1b6
164a949
* Mon Oct 26 2015 Peter Gordon <peter@thecodergeek.com> - 3.2.0-1
164a949
- Update to new upstream release (3.2.0)
164a949
- Drop font locations patches (fixed upstream):
164a949
  - 3.1.8-font-locations.patch
164a949
  - 2.5-font-locations.patch
42e6ad4
- Resolves: #1175228 (python-reportlab-3.2.0 is available).
42e6ad4
- Resolves: #1277162 (Wrong dependency version number for pillow.)
42e6ad4
- Resolves: #1267446 (Missing Requires: on pillow)
164a949
378cc90
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.8-5
378cc90
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
378cc90
9d5efd2
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.8-4
9d5efd2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
9d5efd2
d1f7eee
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.8-3
d1f7eee
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
d1f7eee
8d9f712
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 3.1.8-2
8d9f712
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
8d9f712
09fec3e
* Tue Apr 22 2014 Christopher Meng <rpm@cicku.me> - 3.1.8-1
09fec3e
- Update to 3.1.8
09fec3e
- Documentation package should be -doc instead of -docs.
09fec3e
141dd7d
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-8
141dd7d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
141dd7d
e87e914
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-7
e87e914
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
e87e914
9c96b4e
* Wed Jan 16 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 2.5-6
9c96b4e
- Add a dep on python-imaging to process images
9c96b4e
e28b735
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-5
e28b735
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
e28b735
3bf52ff
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-4
3bf52ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
3bf52ff
4d3032f
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-3
4d3032f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
4d3032f
5fee2dd
* Thu Jan 06 2011 Konstantin Ryabitsev <icon@fedoraproject.org> - 2.5-2
ccf9db5
- Update to version 2.5 of reportlab.
ccf9db5
- Remove tabs in specfile.
ccf9db5
987e774
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.3-3
987e774
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
987e774
234b1a0
* Mon Nov 23 2009 Konstantin Ryabitsev <icon@fedoraproject.org> - 2.3-2
234b1a0
- Do not bundle fonts
234b1a0
- Point the config to Fedora's font locations
234b1a0
c2a34e3
* Thu Nov 12 2009 Konstantin Ryabitsev <icon@fedoraproject.org> - 2.3-1
c2a34e3
- Updated to 2.3
c2a34e3
- New version is no longer noarch.
89be2d9
c2a34e3
* Fri Apr 17 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 2.1-6
c2a34e3
- Rebuild for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
0f432b7
a12bfbe
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-5
a12bfbe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
a12bfbe
d2f276c
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.1-4
d2f276c
- Fix locations for Python 2.6
d2f276c
cdca6a8
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.1-3
cdca6a8
- Rebuild for Python 2.6
cdca6a8
57f9ac8
* Mon Jan  7 2008 Brian Pepple <bpepple@fedoraproject.org> - 2.1-2
57f9ac8
- Remove luxi font. (#427845)
57f9ac8
- Add patch to not search for the luxi font.
57f9ac8
6bba992
* Sat May 26 2007 Brian Pepple <bpepple@fedoraproject.org> - 2.1-1
6bba992
- Update to 2.1.
6bba992
e34f304
* Wed Dec 27 2006 Brian Pepple <bpepple@fedoraproject.org> - 2.0-2
e34f304
- Make docs subpackage.
e34f304
3360b93
* Wed Dec 27 2006 Brian Pepple <bpepple@fedoraproject.org> - 2.0-1
3360b93
- Update to 2.0.
3360b93
ebf8bc4
* Fri Dec  8 2006 Brian Pepple <bpepple@fedoraproject.org> - 1.21.1-2
ebf8bc4
- Rebuild against new python.
ebf8bc4
30429ec
* Thu Sep  7 2006 Brian Pepple <bpepple@fedoraproject.org> - 1.21.1-1
30429ec
- Update to 1.20.1.
30429ec
5842bd3
* Tue Feb 14 2006 Brian Pepple <bdpepple@ameritech.net> - 1.20-5
5842bd3
- rebuilt for new gcc4.1 snapshot and glibc changes
5842bd3
5b41376
* Mon Dec 26 2005 Brian Pepple <bdpepple@ameritech.net> - 1.20-4
5b41376
- Add dist tag. (#176479)
5b41376
5d14128
* Mon May  9 2005 Brian Pepple <bdpepple@ameritech.net> - 1.20-3.fc4
5d14128
- Switchback to sitelib patch.
5d14128
- Make package noarch.
5d14128
5e01348
* Thu Apr  7 2005 Brian Pepple <bdpepple@ameritech.net> - 1.20-2.fc4
5e01348
- Use python_sitearch to fix x86_64 build.
5e01348
0beb175
* Wed Mar 30 2005 Brian Pepple <bdpepple@ameritech.net> - 1.20-1.fc4
0beb175
- Rebuild for Python 2.4.
0beb175
- Update to 1.20.
0beb175
- Switch to the new python macros for python-abi
0beb175
- Add dist tag.
0beb175
cvsextras 10e2495
* Sat Apr 24 2004 Brian Pepple <bdpepple@ameritech.net> 0:1.19-0.fdr.2
c2a34e3
- Removed ghosts.
cvsextras 10e2495
cvsextras 10e2495
* Sat Mar 20 2004 Brian Pepple <bdpepple@ameritech.net> 0:1.19-0.fdr.1
cvsextras 10e2495
- Initial Fedora RPM build.
cvsextras 10e2495