Bug 1234208

Summary: Review Request: PyPDF2 - A Pure-Python library built as a PDF toolkit
Product: [Fedora] Fedora Reporter: Ranjan Maitra <itsme_410>
Component: Package ReviewAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: hgkamath, itsme_410, mark, me, mhayden, package-review
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-11 20:04:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
new spec file
none
Updated new python-PyPDF2.spec none

Description Ranjan Maitra 2015-06-22 03:43:20 UTC
Spec URL: https://streaming.stat.iastate.edu/~stat580/fedora/PyPDF2.spec
SRPM URL: https://streaming.stat.iastate.edu/~stat580/fedora/PyPDF2-1.24-1.1.fc22.src.rpm
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,
- cropping pages,
- merging multiple pages into a single page,
- encrypting and decrypting PDF files.

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.

Fedora Account System Username: maitra

Comment 1 Ganapathi Kamath 2015-07-10 21:34:44 UTC
both python3 and python2 packages can be made concurrently 

you can make 
  python3-PyPDF2-1.24-1.1.fc22.noarch.rpm 
and 
  PyPDF2-1.24-1.1.fc22.noarch.rpm

by using %global with_python3 1 and %if and %endif blocks

as in 
https://dscott.fedorapeople.org/python-SPARQLWrapper.spec

Comment 2 Ranjan Maitra 2015-07-11 06:10:34 UTC
Created attachment 1050852 [details]
new spec file

Comment 3 Ranjan Maitra 2015-07-11 06:11:30 UTC
Hi, I have created a new spec file but I get the following error:

$ rpmbuild -bb python-PyPDF2.spec
error: line 60: Package does not exist: %description  -n python3-PyPDF2

Sorry but I am new to packaging.

Comment 4 Ganapathi Kamath 2015-07-11 06:42:03 UTC
I made the following changes to your spec file make rpmbuild to crank through on my machine.  line 53 had a smelling mistake, and there were some other things.  

$ diff  SPECS/PyPDF2.spec  SPECS/PyPDF2.spec.orig 
30c30
< BuildRequires:  python2-devel python-nose
---
> BuildRequires:  python2-devel
34c34
< BuildRequires:    python3-devel python3-nose
---
> BuildRequires:    python3-devel
53c53
< %package -n python3-%{modulename}
---
> %pachage -n python3-%{modulename}
113c113
< nosetests-3.4 build
---
> nosetests-3.3 build
125c125
< %{python3_sitelib}/*
---
> %{python3_sitelib}/%{modulename}

Comment 5 Ranjan Maitra 2015-07-11 13:22:05 UTC
Created attachment 1050884 [details]
Updated new python-PyPDF2.spec

Comment 6 Ranjan Maitra 2015-07-11 13:56:50 UTC
Thanks for all the help! I was able to build successfully and the builds also go through on koji (for f21, f22, f23 and rawhide). The new spec file is attached.

I am able to create python-PyPDF2-1.24-1.1.fc22.noarch.rpm and python3-PyPDF2-1.24-1.1.fc22.noarch.rpm depending on how I toggle %global with_python3 (1 or 0 respectively). 

Btw, is it not counter-intuitive to declare 0 for true, 1 for false?

However, I always get python-PyPDF2-1.24-1.1.fc22.src.rpm so I have uploaded the RPMs also:


SPEC file:

https://streaming.stat.iastate.edu/~stat580/fedora/python-PyPDF2.spec

SRPM: 
https://streaming.stat.iastate.edu/~stat580/fedora/python-PyPDF2-1.24-1.1.fc22.src.rpm

RPMS:

https://streaming.stat.iastate.edu/~stat580/fedora/python-PyPDF2-1.24-1.1.fc22.noarch.rpm

https://streaming.stat.iastate.edu/~stat580/fedora/python3-PyPDF2-1.24-1.1.fc22.noarch.rpm

Please review and advise further.

Comment 7 Ranjan Maitra 2015-07-14 00:20:26 UTC
Will this package be reviewed?

Comment 8 Jason Tibbitts 2015-07-14 00:24:56 UTC
There are many packages awaiting review; yours is merely one of them.  Patience is a virtue.

You should leave the release as rawhide unless your package is somehow not intended to be part of future Fedora releases.

Comment 9 Ranjan Maitra 2015-07-14 02:59:46 UTC
Thanks! I was just concerned because I have put in another package for review (pdf-stapler as a substitute for the deprecated pdftk) which ideally depends on PyPDF2 (but seems to work on pyPdf. (So, while the latter is what I am requiring in my build, the right package to require is PyPDF2.) 

Thanks for clarifying!

Comment 10 Michael Schwendt 2015-07-19 16:07:41 UTC
Fedora Account System (FAS) tells you're not in the packager group yet.

Seems you've missed step 3 from 2.1 https://fedoraproject.org/wiki/Package_Review_Process#Contributor process.

[...]

Review Tickets always target "Rawhide".

Comment 11 Major Hayden 🤠 2015-07-21 12:39:33 UTC
I'm excited to see this packaged as it will fix bug 1245113 for me.  I've installed the python-PyPDF2-1.24-1.1 RPM from the comment on July 11th above and it fixes my bug.

rpmlint shows a few warnings about the python2 RPM:

$ rpmlint python-PyPDF2-1.24-1.1.fc22.noarch.rpm 
python-PyPDF2.noarch: W: spelling-error %description -l en_US decrypting -> decryption, encrypting, decrying
python-PyPDF2.noarch: W: incoherent-version-in-changelog tat.maitra ['1.24-1.1.fc22', '1.24-1.1']
python-PyPDF2.noarch: W: invalid-license BSD-3-Clause
python-PyPDF2.noarch: W: no-url-tag
python-PyPDF2.noarch: W: no-documentation
python-PyPDF2.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/PyPDF2/pagerange.py 644 /usr/bin/env
1 packages and 0 specfiles checked; 1 errors, 5 warnings.

I'm not a package sponsor, but these are pretty easy to correct.  Feel free to connect with me via email or on IRC (I'm mhayden on Freenode) and I'll be happy to help.

Comment 12 Major Hayden 🤠 2015-08-21 21:35:44 UTC
I have PyPDF2 1.25.1 (which fixes a reportlab PDF bug) and python-xhtml2pdf in a COPR:

  https://copr.fedoraproject.org/coprs/mhayden/python-xhtml2pdf/builds/

Globe Trotter -- did you want to push PyPDF2 to completion here?  Let me know if you need help or a co-maintainer.

Comment 13 Ranjan Maitra 2015-08-22 03:49:11 UTC
I am very confused with what is going on with this submission. I was asked to change my rpm to conform to both python2 and python3 (when I was not interested in python3) but then the suggester did not push forward with the submission. I am happy if you want to submit your COPR package, in which case I will withdraw this review request.

Comment 14 Major Hayden 🤠 2015-08-26 18:49:45 UTC
Ah, okay.  I certainly didn't intend to trample on your previous work -- only to assist.  I gave you some other pointers (see comment 11) to improve the package a bit and make it easier for someone who is a package sponsor to review.

With that said, if you'd like me to own the package, I have no issues there.  If you'd like to own it, I'll gladly step back and let you take it.

Comment 16 Pete Travis 2015-09-11 18:30:20 UTC
Hey Major, a few observations:

- initial package release is 3?
- missing %license
- There are no docs.  Maybe put Scripts in %doc as examples ?
- %doc README.md CHANGELOG
- "Pure-Python" reads like a Specific Thing with a formal definition; say 'pure Python' 
- Where does the BuildRequires on python?-nose come from? The `unittest` module in Tests/tests/py is provided by python?-libs.
- Strip shebang fom pagerange.py, keep rpmlint happy.
- SRPMs for reviews should be built against rawhide.

Comment 17 Pete Travis 2015-09-11 18:32:11 UTC
...oops.  If you are taking over submission for this package, you should open a new review ticket and set it to obsolete this one.

Comment 18 Ranjan Maitra 2015-09-11 18:45:46 UTC
Sorry to intervene, mine was built on koji for F21, F22, F23. Major can build off that. Funny, I had no one volunteer to actually review the package earlier. Glad that someone is available.

Comment 19 Major Hayden 🤠 2015-09-11 19:43:00 UTC
Pete - Thanks, will do.

Globe Trotter - Would you like to co-maintain it?

Comment 20 Ranjan Maitra 2015-09-11 19:49:36 UTC
Major, thanks! Happy to co-maintain. Btw, I got into creating this package because of my desire for pdf-stapler (as an alternative to the deprected package pdftk).

https://bugzilla.redhat.com/show_bug.cgi?id=1234210

The issue there is that the license file is in github but not the authoritative release, and the origial author has not responded to several of my e-mails on the subject.

Comment 21 Pete Travis 2015-09-11 20:04:42 UTC
Hey Globe Trotter, glad you spoke up.

IMO, the 'authoritiative' source for releases is the upstream source code repository, and GitHub, cgit, sourceforge, etc can all export tarballs for a provided.  My preference is to use the git tag for a given release to retrieve sources for that release; this is discussed at https://fedoraproject.org/wiki/Packaging:SourceURL?rd=Packaging/SourceURL#Git_Tags .  pypi is a distribution platform, Fedora is a distribution platform, all can source directly from upstream.

RE: volunteers for review:  Because you are not yet sponsored, the normal pool of reviewers can only do so much for you.  Sponsors are looking for activity and demonstrated understanding of packaging guidelines, techniques, and best practices.  Many active sponsors try to keep up with all FE-NEEDSPONSOR tickets for your submissions, and many other review tickets to be aware of your informal reviews.  If you become active in the review process, you will be sponsored sooner.  If you haven't found them yet, these will help:

https://fedoraproject.org/wiki/Join_the_package_collection_maintainers
https://fedoraproject.org/wiki/How_to_get_sponsored_into_the_packager_group

Comment 22 Major Hayden 🤠 2015-09-11 20:04:53 UTC

*** This bug has been marked as a duplicate of bug 1262470 ***

Comment 23 Ranjan Maitra 2015-09-12 00:25:47 UTC
Major: Would you have interest in co-maintaining pdf-stapler? It is much in demand on Fedora

Comment 24 Major Hayden 🤠 2015-09-14 20:41:43 UTC
(In reply to Globe Trotter from comment #23)
> Major: Would you have interest in co-maintaining pdf-stapler? It is much in
> demand on Fedora

I'm actually not a package sponsor, unfortunately.  I aspire to get into that group one day. ;)

Comment 25 Ranjan Maitra 2015-09-23 14:01:21 UTC
FWIW: here are the updated SRPM and SPEC files:


SPEC: http://maitra.public.iastate.edu/Fedora/python-PyPDF2.spec

SRPM: http://maitra.public.iastate.edu/Fedora/python-PyPDF2-1.25.1-1.1.fc22.src.rpm