Bug 1294704 - Review Request: python3-setuptools - Easily build and distribute Python packages
Review Request: python3-setuptools - Easily build and distribute Python packages
Status: CLOSED ERRATA
Product: Fedora EPEL
Classification: Fedora
Component: Package Review (Show other bugs)
epel7
All Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Ville Skyttä
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 1290393 1294711 1294713 1294714 1294717 1294856 1294860 1294862
  Show dependency treegraph
 
Reported: 2015-12-29 16:38 EST by Orion Poplawski
Modified: 2016-01-12 06:56 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-12 06:56:05 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
ville.skytta: fedora‑review+


Attachments (Terms of Use)

  None (edit)
Description Orion Poplawski 2015-12-29 16:38:49 EST
Spec URL: http://www.cora.nwra.com/~orion/fedora/python3-setuptools.spec
SRPM URL: http://www.cora.nwra.com/~orion/fedora/python3-setuptools-19.1.1-1.el7.src.rpm
Description: 
Setuptools is a collection of enhancements to the Python distutils that allow
you to more easily build and distribute Python packages, especially ones that
have dependencies on other packages.

This package also contains the runtime components of setuptools, necessary to
execute the software that requires pkg_resources.py.

Fedora Account System Username: orion
Comment 1 Ville Skyttä 2015-12-29 17:05:22 EST
URLs return 404 Not Found, and setuptools 19.2 is available...
Comment 2 Orion Poplawski 2015-12-29 17:18:34 EST
oops, fixed.  19.2 isn't even in Fedora rawhide, but sure...

Spec URL: http://www.cora.nwra.com/~orion/fedora/python3-setuptools.spec
SRPM URL: http://www.cora.nwra.com/~orion/fedora/python3-setuptools-19.2-1.el7.src.rpm

* Tue Dec 29 2015 Orion Poplawski <orion@cora.nwra.com> - 19.2-1
- Update to 19.2
Comment 3 Orion Poplawski 2015-12-29 17:48:01 EST
Scratch build - https://koji.fedoraproject.org/koji/taskinfo?taskID=12345583
Comment 4 Ville Skyttä 2015-12-30 04:19:53 EST
Summary and %description should say "Python 3" because this is Python 3 only.

Summary and %description for the binary package should probably say "Python %{python3_version}" instead of "Python 3".

Group tags should go away.

with_check deserves a comment why it's not on by default. For now I think it's because pytest and mock are not available yet, but still.

%with_check and %build_wheel would be better implemented using the standard %bcond_with/out.

pip3 in %install should probably be made more specific. pip-%{python3_version}?

psfl.txt and zpl.txt should be %license, not %doc.

What is the source for psfl.txt and zpl.txt?

psfl.txt talks about Python 2.1.1. Should it be updated to something newer?

Rest of the docs would be better installed as "%doc docs/*" to avoid one unnecessary dir.

/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py has a wrong shebang, "/usr/bin/env python". I believe /usr/bin/env should not be used in the first place for system installed stuff like this, and "python" should probably be "python%{python3_version}" or "%{__python3}"
Comment 5 Orion Poplawski 2015-12-30 11:49:37 EST
(In reply to Ville Skyttä from comment #4)
> Summary and %description should say "Python 3" because this is Python 3 only.
>
> Summary and %description for the binary package should probably say "Python
> %{python3_version}" instead of "Python 3".

The name of the package "python3X-setuptools" will be displayed next to summaries and description and I think makes this point.
 
> Group tags should go away.

Gone.

> with_check deserves a comment why it's not on by default. For now I think
> it's because pytest and mock are not available yet, but still.

Added in a bootstrap flag.

> %with_check and %build_wheel would be better implemented using the standard
> %bcond_with/out.

Perhaps, but I'm going to stick with staying closer to the Fedora setuptools package here.
 
> pip3 in %install should probably be made more specific.
> pip-%{python3_version}?

Looks like probably pip%{python3_version}.

> psfl.txt and zpl.txt should be %license, not %doc.
> 
> What is the source for psfl.txt and zpl.txt?
> 
> psfl.txt talks about Python 2.1.1. Should it be updated to something newer?

I've done so.  And added ASL 2.0 since there appear to be some files under that license.  It's a bit of a mess and there is an upstream issue with no response:

https://bitbucket.org/pypa/setuptools/issues/132/missing-license

> Rest of the docs would be better installed as "%doc docs/*" to avoid one
> unnecessary dir.

Fixed.
 
> /usr/lib/python3.4/site-packages/setuptools/command/easy_install.py has a
> wrong shebang, "/usr/bin/env python". I believe /usr/bin/env should not be
> used in the first place for system installed stuff like this, and "python"
> should probably be "python%{python3_version}" or "%{__python3}"

Removed the unneeded shbang.

Spec URL: http://www.cora.nwra.com/~orion/fedora/python3-setuptools.spec
SRPM URL: http://www.cora.nwra.com/~orion/fedora/python3-setuptools-19.2-2.el7.src.rpm

* Wed Dec 29 2015 Orion Poplawski <orion@cora.nwra.com> - 19.2-2
- Drop group tag
- Add bootstrap conditional
- Use specific pip version
- Use %%license
- Update license and license source
- Strip unneeded shbangs
Comment 6 Orion Poplawski 2015-12-30 13:23:15 EST
Copr: https://copr.fedoraproject.org/coprs/g/python/python3_epel7/
Comment 7 Ville Skyttä 2015-12-30 15:00:55 EST
(In reply to Orion Poplawski from comment #5)
> (In reply to Ville Skyttä from comment #4)
> > Summary and %description should say "Python 3" because this is Python 3 only.
> >
> > Summary and %description for the binary package should probably say "Python
> > %{python3_version}" instead of "Python 3".
> 
> The name of the package "python3X-setuptools" will be displayed next to
> summaries and description

Really, everywhere?

> and I think makes this point.

By that argument you could leave the words python and setuptools out of the summary and description as well. It wouldn't be a good idea to do that either, just like it is not a good idea to knowingly leave inaccurate and possibly misleading versioning information there that would be very easy to fix. I won't block the review because of this, but I suggest you reconsider.

> > Rest of the docs would be better installed as "%doc docs/*" to avoid one
> > unnecessary dir.
>
> Fixed.

Makefile and conf.py in docs don't seem useful, I suggest removing them before the first build.

Accepted.
Comment 8 Orion Poplawski 2015-12-30 15:54:09 EST
Okay, I've added the version to summary/description and cleaned up the docs.  Thanks for the review.
Comment 9 Gwyn Ciesla 2015-12-30 18:57:15 EST
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/python3-setuptools
Comment 10 Fedora Update System 2015-12-30 20:33:33 EST
python3-setuptools-19.2-3.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-c515c5de8e
Comment 11 Fedora Update System 2015-12-31 23:20:34 EST
python3-setuptools-19.2-3.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-c515c5de8e
Comment 12 Denis Fateyev 2016-01-10 06:11:51 EST
Orion, have you managed to get rid of multiple "wrong magic value" rpmlint messages? Or is it a permanent rpmlint issue?
--------------
python34-setuptools.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.4/site-packages/_markerlib/__pycache__/__init__.cpython-34.pyc expected 3260 (3.4), found 3310 (unknown)
python34-setuptools.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.4/site-packages/setuptools/command/__pycache__/bdist_rpm.cpython-34.pyc expected 3260 (3.4), found 3310 (unknown)
python34-setuptools.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.4/site-packages/setuptools/command/__pycache__/build_py.cpython-34.pyc expected 3260 (3.4), found 3310 (unknown)
Comment 13 Ville Skyttä 2016-01-10 06:52:42 EST
That's a bug in the el7 rpmlint; it has a wrong value for Python 3.4 bytecode.

Properly fixing it needs to be done in the el7 rpmlint package, but you can try monkey-patching it in rpmlint's configs, for example in ~/.config/rpmlint:

import FilesCheck
FilesCheck._python_magic_values["3.4"] = 3310

(Seems to work, but importing checks in configs is generally discouraged and may have side effects.)
Comment 14 Fedora Update System 2016-01-12 06:56:01 EST
python3-setuptools-19.2-3.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.