Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
Summary: Review Request: pypng - Python PNG encoder/decoder
https://bugzilla.redhat.com/show_bug.cgi?id=810376
Summary: Review Request: pypng - Python PNG encoder/decoder Product: Fedora Version: rawhide Platform: All OS/Version: Linux Status: NEW Severity: medium Priority: medium Component: Package Review AssignedTo: nobody@fedoraproject.org ReportedBy: mattdm@mattdm.org QAContact: extras-qa@fedoraproject.org CC: notting@redhat.com, package-review@lists.fedoraproject.org Classification: Fedora Story Points: --- Type: --- Regression: --- Mount Type: --- Documentation: ---
Spec URL: http://mattdm.org/misc/fedora/pypng.spec SRPM URL: http://mattdm.org/misc/fedora/pypng-0.0.12-1.fc16.mattdm.src.rpm Description: Python PNG encoder/decoder
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=810376
Kalev Lember kalevlember@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |kalevlember@gmail.com AssignedTo|nobody@fedoraproject.org |kalevlember@gmail.com Flag| |fedora-review?
--- Comment #1 from Kalev Lember kalevlember@gmail.com 2012-04-06 08:02:37 EDT --- Taking for review.
Before going any further, I have a question about the naming of this package. Is there a chance that this will support Python 3 in the future? Because if it is going to, it might make sense to call this 'python-png', making it possible to consistently call the Python 3 version 'python3-png', whenever the Python 3 version becomes supported.
Completely up to you whether to call this 'pypng' or 'python-png', just pointing out the alternative.
http://fedoraproject.org/wiki/Packaging:NamingGuidelines#Addon_Packages_.28p...
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=810376
--- Comment #2 from Matthew Miller mattdm@mattdm.org 2012-04-06 09:31:57 EDT --- (In reply to comment #1)
Completely up to you whether to call this 'pypng' or 'python-png', just pointing out the alternative.
Thanks. I have a preference for "pypng", because people tend to call it that; e.g.:
http://ianwitham.wordpress.com/2009/12/12/pypng-and-the-gimp/ http://www.developer.nokia.com/Community/Discussion/showthread.php?188977-py... http://stackoverflow.com/questions/7863932/horizontal-flip-of-image-on-pytho... http://blog.zillabyte.com/hue-histograms/
and so if people are looking to see if there's a Fedora package, that's probably the first thing they'll look for.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=810376
--- Comment #3 from Kalev Lember kalevlember@gmail.com 2012-04-06 10:20:47 EDT --- (In reply to comment #2)
I have a preference for "pypng", because people tend to call it that
Fair enough.
The main issue I see with this package is that its licensing is unclear. code/png.py appears to be MIT-licensed, but the rest of the code files don't have any licensing information. There's also no readme to clear this up.
Could you ask upstream to clarify licensing and add license headers to code files?
Also some comments about the spec file:
RPM doesn't have automatic python dep extraction, so this package will have to manually specify Requires for other python modules it uses. numpy at least is missing from Requires, perhaps something else as well.
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
python_sitelib is automatically defined by rpm macros in all supported Fedora releases so no need to define it in the spec file. https://fedoraproject.org/wiki/Packaging:Python#Macros
Source0: http://pypng.googlecode.com/files/pypng-0.0.12.tar.gz
Use the %{version} macro here. With this, when updating to a new upstream release, you'll only need to update the Version: tag and the source URL won't need updating each time.
%build # Remove CFLAGS=... for noarch packages (unneeded) CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
This _is_ a noarch package, so CFLAGS aren't needed here.
%install rm -rf $RPM_BUILD_ROOT
The rm -rf isn't needed with the version of rpmbuild in supported Fedora releases.
https://bugzilla.redhat.com/show_bug.cgi?id=810376
Petr Viktorin pviktori@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |pviktori@redhat.com
--- Comment #4 from Petr Viktorin pviktori@redhat.com ---
RPM doesn't have automatic python dep extraction, so this package will have to manually specify Requires for other python modules it uses. numpy at least is missing from Requires, perhaps something else as well.
numpy is a "soft dependency", it speeds things up but the library works without it.
https://bugzilla.redhat.com/show_bug.cgi?id=810376
Jerry James loganjerry@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |loganjerry@gmail.com
--- Comment #5 from Jerry James loganjerry@gmail.com --- The URLs for the spec file and SRPM are now broken links. Can you update with working URLs?
https://bugzilla.redhat.com/show_bug.cgi?id=810376
--- Comment #6 from Petr Viktorin pviktori@redhat.com --- Note that upstream has moved to Github: https://code.google.com/p/pypng/ Also, they've clarified the licensing: https://github.com/drj11/pypng/pull/14
https://bugzilla.redhat.com/show_bug.cgi?id=810376
--- Comment #7 from Matthew Miller mattdm@redhat.com --- Wooo. Okay, thanks. I'll work on updating this.
https://bugzilla.redhat.com/show_bug.cgi?id=810376
Zbigniew Jędrzejewski-Szmek zbyszek@in.waw.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zbyszek@in.waw.pl
--- Comment #8 from Zbigniew Jędrzejewski-Szmek zbyszek@in.waw.pl --- (In reply to Matthew Miller from comment #2)
(In reply to comment #1)
Completely up to you whether to call this 'pypng' or 'python-png', just pointing out the alternative.
Thanks. I have a preference for "pypng", because people tend to call it that; e.g.:
Please rename it to python-png or python-pypng. It's better to do it now, than in a few months when python 3 version is added. It is only a question of time before that happens.
https://bugzilla.redhat.com/show_bug.cgi?id=810376
--- Comment #9 from Matthew Miller mattdm@redhat.com --- How much had I forgotten all about this? A lot. Sorry. Will put it on my near-term todo list.
(In reply to Zbigniew Jędrzejewski-Szmek from comment #8)
Please rename it to python-png or python-pypng. It's better to do it now, than in a few months when python 3 version is added. It is only a question of time before that happens.
Have the guidelines changed on this?
https://bugzilla.redhat.com/show_bug.cgi?id=810376
--- Comment #10 from Zbigniew Jędrzejewski-Szmek zbyszek@in.waw.pl --- (In reply to Matthew Miller from comment #9)
How much had I forgotten all about this? A lot. Sorry. Will put it on my near-term todo list.
(In reply to Zbigniew Jędrzejewski-Szmek from comment #8)
Please rename it to python-png or python-pypng. It's better to do it now, than in a few months when python 3 version is added. It is only a question of time before that happens.
Have the guidelines changed on this?
No, I don't think so. The guidelines for "add-on modules" are:
Packages of python modules (thus they rely on python as a parent) use a slightly different naming scheme. They should take into account the upstream name of the python module. This makes a package name format of python-$NAME.
...
So all python3 modules MUST have python3 in their name. Other than that, the module must be in the same format as the python2 package.
Anyway, the alternative — pyglet and python3-pyglet — seems quite confusing. I think that this approach is only used for existing packages, all new packages use the python- and python3- prefixes.
https://bugzilla.redhat.com/show_bug.cgi?id=810376
Matthew Miller mattdm@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Review Request: pypng - |Review Request: |Python PNG encoder/decoder |python-pypng - Python PNG | |encoder/decoder
--- Comment #11 from Matthew Miller mattdm@redhat.com --- Hey look, an update!
Spec URL: http://mattdm.org/misc/fedora/python-pypng.spec SRPM URL: http://mattdm.org/misc/fedora/python-pypng-0.0.16-1.fc19.src.rpm
https://bugzilla.redhat.com/show_bug.cgi?id=810376
--- Comment #12 from Pete Zaitcev zaitcev@redhat.com --- Mattew, any plans for python3-pypng? I threw together a quick-fix SPEC based on yours: http://people.redhat.com/zaitcev/tmp/python-pypng-0.0.16-1.z1.spec
https://bugzilla.redhat.com/show_bug.cgi?id=810376
--- Comment #13 from Zbigniew Jędrzejewski-Szmek zbyszek@in.waw.pl --- Does anyone mind if I take over the review?
https://bugzilla.redhat.com/show_bug.cgi?id=810376
Kalev Lember kalevlember@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW Assignee|kalevlember@gmail.com |nobody@fedoraproject.org Flags|fedora-review? |
--- Comment #14 from Kalev Lember kalevlember@gmail.com --- Zbigniew, please do, I don't mind at all.
https://bugzilla.redhat.com/show_bug.cgi?id=810376
Zbigniew Jędrzejewski-Szmek zbyszek@in.waw.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|nobody@fedoraproject.org |zbyszek@in.waw.pl Flags| |fedora-review?
https://bugzilla.redhat.com/show_bug.cgi?id=810376
--- Comment #15 from Zbigniew Jędrzejewski-Szmek zbyszek@in.waw.pl --- Nice and clean, with minor issues:
Issues: ======= - Upstream URL has changed to https://github.com/drj11/pypng
- BR should be changed to python2-devel according to the Python Guidelines
- %check could run nosetests png.py
- It would be great to incorporate the changes to add python3-pypng from comment #12.
===== MUST items =====
Generic: [x]: Package is licensed with an open-source compatible license and meets other legal requirements as defined in the legal section of Packaging Guidelines. [!]: If (and only if) the source package includes the text of the license(s) in its own file, then that file, containing the text of the license(s) for the package is included in %doc. %doc LICENCE can be added
[x]: License field in the package spec file matches the actual license. [x]: Package contains no bundled libraries without FPC exception. [x]: Changelog in prescribed format. [x]: Sources contain only permissible code or content. [-]: Package contains desktop file if it is a GUI application. [-]: Development files must be in a -devel package [x]: Package uses nothing in %doc for runtime. [x]: Package consistently uses macros (instead of hard-coded directory names). [x]: Package is named according to the Package Naming Guidelines. [x]: Package does not generate any conflict. [x]: Package obeys FHS, except libexecdir and /usr/target. [-]: If the package is a rename of another package, proper Obsoletes and Provides are present. [x]: Requires correct, justified where necessary. [x]: Spec file is legible and written in American English. [-]: Package contains systemd file(s) if in need. [x]: Package is not known to require an ExcludeArch tag. [-]: Large documentation must go in a -doc subpackage. Large could be size (~1MB) or number of files. Note: Documentation size is 10240 bytes in 1 files. [x]: Package complies to the Packaging Guidelines [x]: Package successfully compiles and builds into binary rpms on at least one supported primary architecture. [x]: Package installs properly. [x]: Rpmlint is run on all rpms the build produces. Note: There are rpmlint messages (see attachment). [x]: Package requires other packages for directories it uses. [x]: Package must own all directories that it creates. [x]: Package does not own files or directories owned by other packages. [x]: All build dependencies are listed in BuildRequires, except for any that are listed in the exceptions section of Packaging Guidelines. [x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT [x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the beginning of %install. [x]: Macros in Summary, %description expandable at SRPM build time. [x]: Package does not contain duplicates in %files. [x]: Permissions on files are set properly. [x]: Package use %makeinstall only when make install' ' DESTDIR=... doesn't work. [x]: Package is named using only allowed ASCII characters. [x]: Package do not use a name that already exist [x]: Package is not relocatable. [x]: Sources used to build the package match the upstream source, as provided in the spec URL. [x]: Spec file name must match the spec package %{name}, in the format %{name}.spec. [x]: File names are valid UTF-8. [x]: Packages must not store files under /srv, /opt or /usr/local
Python: [x]: Python eggs must not download any dependencies during the build process. [-]: A package which is used by another package via an egg interface should provide egg info. [x]: Package meets the Packaging Guidelines::Python [x]: Binary eggs must be removed in %prep
===== SHOULD items =====
Generic: [-]: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it. [x]: Final provides and requires are sane (see attachments). [x]: Package functions as described. [x]: Latest version is packaged. [x]: Package does not include license text files separate from upstream. [-]: Description and summary sections in the package spec file contains translations for supported Non-English languages, if available. [x]: Package should compile and build into binary rpms on all supported architectures. [?]: %check is present and all tests pass. [x]: Packages should try to preserve timestamps of original installed files. [x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file [x]: Sources can be downloaded from URI in Source: tag [x]: Reviewer should test that the package builds in mock. [x]: Buildroot is not present [x]: Package has no %clean section with rm -rf %{buildroot} (or $RPM_BUILD_ROOT) [x]: Dist tag is present (not strictly required in GL). [x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin. [x]: SourceX is a working URL. [x]: Spec use %global instead of %define unless justified.
===== EXTRA items =====
Generic: [x]: Rpmlint is run on all installed packages. Note: There are rpmlint messages (see attachment). [x]: Spec file according to URL is the same as in SRPM.
Rpmlint ------- Checking: python-pypng-0.0.16-1.fc20.noarch.rpm python-pypng-0.0.16-1.fc20.src.rpm python-pypng.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/png.py 0644L /usr/bin/env python-pypng.src:7: W: mixed-use-of-spaces-and-tabs (spaces: line 3, tab: line 7) 2 packages and 0 specfiles checked; 1 errors, 1 warnings.
Requires -------- python-pypng (rpmlib, GLIBC filtered): python(abi)
Provides -------- python-pypng: python-pypng
Source checksums ---------------- https://github.com/drj11/pypng/archive/pypng-0.0.16.zip : CHECKSUM(SHA256) this package : 195c78926ed2e2864cc85a08e5515d19a67d45c3d8199b964ae9d4474cc7469f CHECKSUM(SHA256) upstream package : 195c78926ed2e2864cc85a08e5515d19a67d45c3d8199b964ae9d4474cc7469f
Generated by fedora-review 0.5.1 (bb9bf27) last change: 2013-12-13 Command line :/usr/bin/fedora-review -n python-pypng Buildroot used: fedora-20-x86_64 Active plugins: Python, Generic, Shell-api Disabled plugins: Java, C/C++, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP, Ruby Disabled flags: EXARCH, EPEL5, BATCH, DISTTAG
https://bugzilla.redhat.com/show_bug.cgi?id=810376
--- Comment #16 from Matthew Miller mattdm@redhat.com --- Whoo, thanks everyone. I'm in Brno at DevConf right now, but I'll try to get to the updates RSN. Pete, do you want to be a co-maintainer? I'm still interested but I literally forget what project I wanted this for in the first place. :)
https://bugzilla.redhat.com/show_bug.cgi?id=810376
--- Comment #17 from Jerry James loganjerry@gmail.com --- Please pardon yet another 3rd party jumping in with proposed spec file enhancements:
http://jjames.fedorapeople.org/pypng/
This incorporates all of the suggestions above, and also: - Uses upstream's tar.gz release instead of its zip release - Enables the optional Cython interface, which can speed up png file reading - Ships the example code - Preserves timestamps when removing /usr/bin/env - Builds the documentation with Sphinx - Cleans up the python3 build dir
It does NOT ship both python2 and python3 versions of the examples, because that just seems too complicated....
https://bugzilla.redhat.com/show_bug.cgi?id=810376
--- Comment #18 from Pete Zaitcev zaitcev@redhat.com --- (In reply to Matthew Miller from comment #16)
Pete, do you want to be a co-maintainer?
Yeah, I'll take it. If Spot maintains 300 packages...
https://bugzilla.redhat.com/show_bug.cgi?id=810376
--- Comment #19 from Matthew Miller mattdm@redhat.com --- Pete / Zbigniew, what do you think of Jerry's changes? I'm kind of thinking we should get the initial package through review as Pete's version, and then add Jerry's enhancements in rawhide.
https://bugzilla.redhat.com/show_bug.cgi?id=810376
--- Comment #20 from Zbigniew Jędrzejewski-Szmek zbyszek@in.waw.pl --- (In reply to Matthew Miller from comment #19)
Pete / Zbigniew, what do you think of Jerry's changes? I'm kind of thinking we should get the initial package through review as Pete's version
Both should be OK... But why wait, let's incorporate the changes now while they're hot.
https://bugzilla.redhat.com/show_bug.cgi?id=810376
--- Comment #21 from Matthew Miller mattdm@redhat.com --- I'm a little worried about the non-upstreamed changes, simply because I don't have time to test them and that seems a little irresponsible. But if you all think it's good I'm fine with full-steam ahead. :)
https://bugzilla.redhat.com/show_bug.cgi?id=810376
--- Comment #22 from Zbigniew Jędrzejewski-Szmek zbyszek@in.waw.pl --- Ping?
https://bugzilla.redhat.com/show_bug.cgi?id=810376
--- Comment #23 from Matthew Miller mattdm@redhat.com --- Oh hi. Thanks for the ping. (png? hmm.) Updated to newest upstream version:
Spec URL: http://mattdm.org/misc/fedora/python-pypng.spec SRPM URL: http://mattdm.org/misc/fedora/python-pypng-0.0.17-1.fc22.mattdm.src.rpm
What is the correct thing to do with python3 at this point? The readme notes
PyPNG also works on Python 3.x if you use the 2to3 tool which it should do automatically (this support is very recent, and preliminary). I assume that should be done and a python3 subpackage created?
https://bugzilla.redhat.com/show_bug.cgi?id=810376
Zbigniew Jędrzejewski-Szmek zbyszek@in.waw.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |CLOSED Resolution|--- |DUPLICATE Last Closed| |2015-05-12 13:03:14
--- Comment #24 from Zbigniew Jędrzejewski-Szmek zbyszek@in.waw.pl --- That's embarrassing.
*** This bug has been marked as a duplicate of bug 1096350 ***
https://bugzilla.redhat.com/show_bug.cgi?id=810376
--- Comment #25 from Matthew Miller mattdm@redhat.com --- (In reply to Zbigniew Jędrzejewski-Szmek from comment #24)
That's embarrassing.
Heh. Well, happens sometimes. :)
I forget what I even wanted this for, by now. :)
https://bugzilla.redhat.com/show_bug.cgi?id=810376
--- Comment #26 from Pete Zaitcev zaitcev@redhat.com --- Sadly I know of no alternative. I need to generate some kind of picture http://zaitcev.livejournal.com/220516.html https://github.com/zaitcev/glie
I'm open to co-maintaining it in Fedora. I don't have a PP bit, but I have several packages, including Python based.
https://bugzilla.redhat.com/show_bug.cgi?id=810376
--- Comment #27 from Matthew Miller mattdm@redhat.com --- Pete, it looks like the package is approved and pushed in the other bug. I'm sure Ralph would be happy for a comaintainer.
package-review@lists.fedoraproject.org