#2 Update/Adapt for EPEL7
Opened 4 years ago by swt2c. Modified 4 years ago
rpms/ swt2c/python-PyPDF2 fix_epel7  into  epel7

file modified
+1
@@ -1,1 +1,2 @@ 

  /PyPDF2-1.25.1.tar.gz

+ /PyPDF2-1.26.0.tar.gz

file modified
+127 -54
@@ -1,26 +1,21 @@ 

+ %global srcname PyPDF2

  %global with_python3 1

+ %global sum Python PDF toolkit and library

  

- Name:           python-PyPDF2

- Version:        1.25.1

- Release:        2%{?dist}

+ Name:           python-%{srcname}

+ Version:        1.26.0

+ Release:        12%{?dist}

  License:        BSD

- Summary:        Python PDF toolkit and library

- Group:          Development/Libraries

- Source:         https://pypi.python.org/packages/source/P/PyPDF2/PyPDF2-%{version}.tar.gz

+ Summary:        %{sum}

+ Source:         https://pypi.python.org/packages/source/P/%{srcname}/%{srcname}-%{version}.tar.gz

  URL:            https://github.com/mstamy2/PyPDF2

  

- BuildRequires:  python2-devel

- BuildRequires:  python-libs

  BuildArch:      noarch

  

- %if 0%{?with_python3}

- BuildRequires:    python3-devel

- BuildRequires:    python3-libs

- %endif

  

  %description

  A pure Python library built as a PDF toolkit.  It is capable of:

-     

+ 

  - extracting document information (title, author, ...),

  - splitting documents page by page,

  - merging documents page by page,
@@ -33,13 +28,17 @@ 

  objects rather than file streams, allowing for PDF manipulation in memory.

  It is therefore a useful tool for websites that manage or manipulate PDFs.

  

- %if 0%{?with_python3}

- %package -n python3-PyPDF2

- Summary:        Python PDF toolkit and library

+ %package -n python2-%{srcname}

+ Summary:        %{sum}

+ BuildRequires:  python2-devel

+ BuildRequires:  python2-libs

+ Obsoletes:      python-%{srcname} <= 1.25.1-6

+ %{?python_provide:%python_provide python2-%{srcname}}

+ 

  

- %description  -n python3-PyPDF2

+ %description -n python2-%{srcname}

  A pure Python library built as a PDF toolkit.  It is capable of:

-     

+ 

  - extracting document information (title, author, ...),

  - splitting documents page by page,

  - merging documents page by page,
@@ -51,53 +50,53 @@ 

  dependencies on external libraries.  It can also work entirely on StringIO

  objects rather than file streams, allowing for PDF manipulation in memory.

  It is therefore a useful tool for websites that manage or manipulate PDFs.

- %endif

  

- %package -n python-PyPDF2-doc

- Summary:    Documentation for python-PyPDF2

+ %package -n python%{python3_pkgversion}-%{srcname}

+ Summary:        %{sum}

+ BuildRequires:  python%{python3_pkgversion}-devel

+ BuildRequires:  python2-libs

+ %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}

  

- %description -n python-PyPDF2-doc

- python-PyPDF2 contains documentation and examples for the python-PyPDF package

  

- %prep

- %setup -q -n PyPDF2-%{version}

+ %description -n python%{python3_pkgversion}-%{srcname}

+ A pure Python library built as a PDF toolkit.  It is capable of:

  

+ - extracting document information (title, author, ...),

+ - splitting documents page by page,

+ - merging documents page by page,

+ - cropping pages,

+ - merging multiple pages into a single page,

+ - encryption and decryption of PDF files.

  

- %build

- # Build for Python 3

- %if 0%{?with_python3}

- %{__python3} setup.py build

- mv build build3

- %endif

+ By being pure Python, it should run on any Python platform without any

+ dependencies on external libraries.  It can also work entirely on StringIO

+ objects rather than file streams, allowing for PDF manipulation in memory.

+ It is therefore a useful tool for websites that manage or manipulate PDFs.

  

- # Build for Python 2

- %{__python2} setup.py build

- mv build build2

+ %package -n python-%{srcname}-doc

+ Summary:    Documentation for python-%{srcname}

  

+ %description -n python-%{srcname}-doc

+ python-PyPDF2 contains documentation and examples for the python-PyPDF package

  

- %install

- mv build2 build

- %{__python2} setup.py install --skip-build --root %{buildroot}

+ %prep

+ %autosetup -n %{srcname}-%{version}

  

  # non-executable script

- sed -i -e '/^#!\//, 1d' %{buildroot}%{python2_sitelib}/PyPDF2/pagerange.py

+ sed -i -e '/^#!\//, 1d' PyPDF2/pagerange.py

  

  # Lots of things in the repo shouldn't be executable

  chmod a-x Scripts/* Sample_Code/* LICENSE README.md CHANGELOG

  

- rm -rf build

- 

- %if 0%{?with_python3}

- mv build3 build

- %{__python3} setup.py install --skip-build --root %{buildroot}

  

- # non-executable script

- sed -i -e '/^#!\//, 1d' %{buildroot}%{python3_sitelib}/PyPDF2/pagerange.py

+ %build

+ %py2_build

+ %py3_build

  

- # Lots of things in the repo shouldn't be executable

- chmod a-x Scripts/* Sample_Code/* LICENSE README.md CHANGELOG

  

- %endif

+ %install

+ %py3_install

+ %py2_install

  

  

  %check
@@ -105,22 +104,96 @@ 

  #python -m unittest Tests.tests

  

  

- %files

- %defattr(-,root,root,-)

+ %files -n python2-%{srcname}

  %{python2_sitelib}/*

  %license LICENSE

  

- %if 0%{?with_python3}

- %files -n python3-PyPDF2

+ %files -n python%{python3_pkgversion}-%{srcname}

  %{python3_sitelib}/*

  %license LICENSE

- %endif

  

- %files -n python-PyPDF2-doc

+ %files -n python-%{srcname}-doc

  %doc README.md CHANGELOG Scripts/ Sample_Code/

  %license LICENSE

  

  %changelog

+ * Mon Oct 28 2019 Scott Talbert <swt@techie.net> - 1.26.0-12

+ - Adapt for EPEL

+ 

+ * Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.26.0-11

+ - Rebuilt for Python 3.8.0rc1 (#1748018)

+ 

+ * Sun Aug 18 2019 Miro Hrončok <mhroncok@redhat.com> - 1.26.0-10

+ - Rebuilt for Python 3.8

+ 

+ * Sun Aug 18 2019 Miro Hrončok <mhroncok@redhat.com> - 1.26.0-9

+ - Rebuilt for Python 3.8

+ 

+ * Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.26.0-8

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

+ 

+ * Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.26.0-7

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

+ 

+ * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.26.0-6

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

+ 

+ * Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.26.0-5

+ - Rebuilt for Python 3.7

+ 

+ * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.26.0-4

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

+ 

+ * Wed Feb 07 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.26.0-3

+ - Update Python 2 dependency declarations to new packaging standards

+   (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

+ 

+ * Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.26.0-2

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

+ 

+ * Wed Mar 22 2017 major <major@mhtx.net> - 1.26.0-1

+ - Upstream version 1.26.0

+ 

+ * Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.25.1-15

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

+ 

+ * Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.25.1-14

+ - Rebuild for Python 3.6

+ 

+ * Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.1-13

+ - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

+ 

+ * Fri May 20 2016 Major Hayden <major@mhtx.net> - 1.25.1-12

+ - Setting srcname variable so python_provide works properly

+ - Removing Provides tag

+ 

+ * Fri May 20 2016 Major Hayden <major@mhtx.net> - 1.25.1-11

+ - Adding Provides tag to fix dependency problems

+ 

+ * Thu May 19 2016 Major Hayden <major@mhtx.net> - 1.25.1-10

+ - Correcting python_provides line for python2

+ 

+ * Thu May 19 2016 Major Hayden <major@mhtx.net> - 1.25.1-9

+ - Removing srcname variable in Provides

+ 

+ * Mon May 16 2016 Major Hayden <major@mhtx.net> - 1.25.1-8

+ - Correcting typo

+ 

+ * Mon May 16 2016 Major Hayden <major@mhtx.net> - 1.25.1-7

+ - Adding version number to obsoletes tag

+ 

+ * Thu May 5 2016 Major Hayden <major@mhtx.net> - 1.25.1-6

+ - Adding obsoletes tag

+ 

+ * Thu May 5 2016 Major Hayden <major@mhtx.net> - 1.25.1-5

+ - Fixed Python 3 packaging

+ 

+ * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.25.1-4

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

+ 

+ * Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.1-3

+ - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

+ 

  * Wed Sep 23 2015 Major Hayden <major@mhtx.net> - 1.25.1-2

  - Additional package review fixes

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- ee5e5b01d00b120805e5049e56c6fd7c  PyPDF2-1.25.1.tar.gz

+ SHA512 (PyPDF2-1.26.0.tar.gz) = 7b427f1d099dcd687a718fb8d86e6f677ad45257414c6367e4dfacd8dfef7e3dbe3816027359868764981f36a30721f1731b4c23cbe2f35cfab1c64fb290b034

This consists of a fast-forward to the latest master commit, plus an update to replace python3 -> python%{python3_pkgversion} for EPEL.

Note that if you'd prefer to keep a single spec with master/EPEL7, I can make the python3_pkgversion change in master instead.