Blame python-PyPDF2.spec

2ff095d
%global srcname PyPDF2
df16d78
%global with_python3 1
65bf3e8
%global sum Python PDF toolkit and library
df16d78
2ff095d
Name:           python-%{srcname}
da40169
Version:        1.26.0
da40169
Release:        1%{?dist}
df16d78
License:        BSD
65bf3e8
Summary:        %{sum}
df16d78
Group:          Development/Libraries
2ff095d
Source:         https://pypi.python.org/packages/source/P/%{srcname}/%{srcname}-%{version}.tar.gz
df16d78
URL:            https://github.com/mstamy2/PyPDF2
df16d78
df16d78
BuildArch:      noarch
df16d78
df16d78
df16d78
%description
df16d78
A pure Python library built as a PDF toolkit.  It is capable of:
65bf3e8
65bf3e8
- extracting document information (title, author, ...),
65bf3e8
- splitting documents page by page,
65bf3e8
- merging documents page by page,
65bf3e8
- cropping pages,
65bf3e8
- merging multiple pages into a single page,
65bf3e8
- encryption and decryption of PDF files.
65bf3e8
65bf3e8
By being pure Python, it should run on any Python platform without any
65bf3e8
dependencies on external libraries.  It can also work entirely on StringIO
65bf3e8
objects rather than file streams, allowing for PDF manipulation in memory.
65bf3e8
It is therefore a useful tool for websites that manage or manipulate PDFs.
65bf3e8
2ff095d
%package -n python2-%{srcname}
65bf3e8
Summary:        %{sum}
65bf3e8
BuildRequires:  python2-devel
65bf3e8
BuildRequires:  python-libs
2ff095d
Obsoletes:      python-%{srcname} <= 1.25.1-6
2ff095d
%{?python_provide:%python_provide python2-%{srcname}}
65bf3e8
65bf3e8
2ff095d
%description -n python2-%{srcname}
65bf3e8
A pure Python library built as a PDF toolkit.  It is capable of:
65bf3e8
df16d78
- extracting document information (title, author, ...),
df16d78
- splitting documents page by page,
df16d78
- merging documents page by page,
df16d78
- cropping pages,
df16d78
- merging multiple pages into a single page,
df16d78
- encryption and decryption of PDF files.
df16d78
df16d78
By being pure Python, it should run on any Python platform without any
df16d78
dependencies on external libraries.  It can also work entirely on StringIO
df16d78
objects rather than file streams, allowing for PDF manipulation in memory.
df16d78
It is therefore a useful tool for websites that manage or manipulate PDFs.
df16d78
2ff095d
%package -n python3-%{srcname}
65bf3e8
Summary:        %{sum}
65bf3e8
BuildRequires:  python3-devel
65bf3e8
BuildRequires:  python-libs
2ff095d
%{?python_provide:%python_provide python3-%{srcname}}
df16d78
65bf3e8
2ff095d
%description -n python3-%{srcname}
df16d78
A pure Python library built as a PDF toolkit.  It is capable of:
65bf3e8
df16d78
- extracting document information (title, author, ...),
df16d78
- splitting documents page by page,
df16d78
- merging documents page by page,
df16d78
- cropping pages,
df16d78
- merging multiple pages into a single page,
df16d78
- encryption and decryption of PDF files.
df16d78
df16d78
By being pure Python, it should run on any Python platform without any
df16d78
dependencies on external libraries.  It can also work entirely on StringIO
df16d78
objects rather than file streams, allowing for PDF manipulation in memory.
df16d78
It is therefore a useful tool for websites that manage or manipulate PDFs.
df16d78
2ff095d
%package -n python-%{srcname}-doc
2ff095d
Summary:    Documentation for python-%{srcname}
df16d78
2ff095d
%description -n python-%{srcname}-doc
df16d78
python-PyPDF2 contains documentation and examples for the python-PyPDF package
df16d78
df16d78
%prep
2ff095d
%autosetup -n %{srcname}-%{version}
df16d78
df16d78
# non-executable script
65bf3e8
sed -i -e '/^#!\//, 1d' PyPDF2/pagerange.py
df16d78
df16d78
# Lots of things in the repo shouldn't be executable
df16d78
chmod a-x Scripts/* Sample_Code/* LICENSE README.md CHANGELOG
df16d78
df16d78
65bf3e8
%build
65bf3e8
%py2_build
65bf3e8
%py3_build
df16d78
df16d78
65bf3e8
%install
65bf3e8
%py3_install
65bf3e8
%py2_install
df16d78
df16d78
df16d78
%check
df16d78
# NOTE: Upstream has some testing bugs
df16d78
#python -m unittest Tests.tests
df16d78
df16d78
2ff095d
%files -n python2-%{srcname}
df16d78
%defattr(-,root,root,-)
df16d78
%{python2_sitelib}/*
df16d78
%license LICENSE
df16d78
2ff095d
%files -n python3-%{srcname}
301e5bc
%defattr(-,root,root,-)
df16d78
%{python3_sitelib}/*
df16d78
%license LICENSE
df16d78
2ff095d
%files -n python-%{srcname}-doc
df16d78
%doc README.md CHANGELOG Scripts/ Sample_Code/
df16d78
%license LICENSE
df16d78
df16d78
%changelog
da40169
* Wed Mar 22 2017 major <major@mhtx.net> - 1.26.0-1
da40169
- Upstream version 1.26.0
da40169
86c1628
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.25.1-15
86c1628
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
86c1628
aacb49c
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 1.25.1-14
aacb49c
- Rebuild for Python 3.6
aacb49c
ec61f97
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.1-13
ec61f97
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
ec61f97
2ff095d
* Fri May 20 2016 Major Hayden <major@mhtx.net> - 1.25.1-12
2ff095d
- Setting srcname variable so python_provide works properly
2ff095d
- Removing Provides tag
2ff095d
cf434ad
* Fri May 20 2016 Major Hayden <major@mhtx.net> - 1.25.1-11
cf434ad
- Adding Provides tag to fix dependency problems
cf434ad
9fc8d05
* Thu May 19 2016 Major Hayden <major@mhtx.net> - 1.25.1-10
9fc8d05
- Correcting python_provides line for python2
9fc8d05
28a8a0d
* Thu May 19 2016 Major Hayden <major@mhtx.net> - 1.25.1-9
28a8a0d
- Removing srcname variable in Provides
28a8a0d
53f73d0
* Mon May 16 2016 Major Hayden <major@mhtx.net> - 1.25.1-8
53f73d0
- Correcting typo
53f73d0
c7f3c9b
* Mon May 16 2016 Major Hayden <major@mhtx.net> - 1.25.1-7
c7f3c9b
- Adding version number to obsoletes tag
c7f3c9b
301e5bc
* Thu May 5 2016 Major Hayden <major@mhtx.net> - 1.25.1-6
301e5bc
- Adding obsoletes tag
301e5bc
65bf3e8
* Thu May 5 2016 Major Hayden <major@mhtx.net> - 1.25.1-5
65bf3e8
- Fixed Python 3 packaging
65bf3e8
e611d95
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.25.1-4
e611d95
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
e611d95
399d683
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.1-3
399d683
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
399d683
df16d78
* Wed Sep 23 2015 Major Hayden <major@mhtx.net> - 1.25.1-2
df16d78
- Additional package review fixes
df16d78
df16d78
* Fri Sep 11 2015 Major Hayden <major@mhtx.net> - 1.25.1-1
df16d78
- Initial package