Bug 1696399 - Review Request: python-jaraco-functools - Functools like those found in stdlib
Summary: Review Request: python-jaraco-functools - Functools like those found in stdlib
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1695803
Blocks: 1411746 1697687
TreeView+ depends on / blocked
 
Reported: 2019-04-04 18:50 UTC by Dan Radez
Modified: 2019-04-09 14:17 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-04-09 14:17:59 UTC
Type: Bug
Embargoed:
eclipseo: fedora-review+


Attachments (Terms of Use)

Description Dan Radez 2019-04-04 18:50:01 UTC
Spec URL: https://radez.fedorapeople.org/python-jaraco-functools.spec
SRPM URL: https://radez.fedorapeople.org/python-jaraco-functools-2.0-1.fc30.src.rpm
Description: Functools like those found in stdlib
Fedora Account System Username: radez

Comment 1 Robert-André Mauchin 🐧 2019-04-04 23:56:15 UTC
Python package are not built that way, you must create a python3 subpackage: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_naming

See example: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_example_python_spec_file

Don't forget the python provide.

Comment 2 Robert-André Mauchin 🐧 2019-04-04 23:56:55 UTC
https://files.pythonhosted.org/packages/source/j/%{pypi_name}/jaraco.functools-%{version}.tar.gz → %{pypi_source}

Comment 3 Dan Radez 2019-04-05 14:39:08 UTC
Thanks for the review.

I've uploaded new spec and srpm with the subpackage added.
I didn't change the source to %{pypi_source} because the upstream package names the package jaraco.functools but the rpm package is jaraco-functools. RPM doesn't find the tar.gz because of the mismatched name. Is there a different way I should handle this discrepancy in naming?

Comment 4 Robert-André Mauchin 🐧 2019-04-05 15:56:26 UTC
Yes: %{pypi_source jaraco.functools}

Comment 5 Dan Radez 2019-04-05 16:07:21 UTC
fixed, new spec and srpm uploaded

Comment 6 Robert-André Mauchin 🐧 2019-04-05 16:45:19 UTC
 - Same issue with description:

%description -n python3-%{pypi_name}
%{description}

 won't work. Use a %global or copy the description.

 - There's a conflict with jaraco-classes, both packages provide the same __init__.py in %{python3_sitelib}/jaraco (and compiled bytecode)

You should remove one otherwise the package is not installable.



Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed


Issues:
=======
- Package installs properly.
  Note: Installation errors (see attachment)
  See: https://docs.fedoraproject.org/en-US/packaging-guidelines/


===== 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.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "Expat License". 24 files have unknown
     license. Detailed output of licensecheck in
     /home/bob/packaging/review/python-jaraco-functools/review-python-
     jaraco-functools/licensecheck.txt
[x]: Package does not own files or directories owned by other packages.
     Note: Dirs in package are owned also by: /usr/lib/python3.7/site-
     packages/jaraco(python3-jaraco-packaging), /usr/lib/python3.7/site-
     packages/jaraco/__pycache__(python3-jaraco-packaging)
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[!]: Macros in Summary, %description expandable at SRPM build time.
     Note: Macros in: python3-jaraco-functools (description)
[-]: 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.
[?]: Package does not generate any conflict.
     Note: Package contains Conflicts: tag(s) needing fix or justification.
[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.
[x]: 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]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: 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 %license.
[x]: Package requires other packages for directories it uses.
[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]: Dist tag is present.
[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 does not use a name that already exists.
[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.
[x]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[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).
[?]: 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]: 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]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[!]: Rpmlint is run on all installed packages.
     Note: Mock build failed
     See: https://docs.fedoraproject.org/en-US/packaging-
     guidelines/#_use_rpmlint
[x]: Spec file according to URL is the same as in SRPM.



Rpmlint
-------
Checking: python3-jaraco-functools-2.0-1.fc31.noarch.rpm
          python-jaraco-functools-2.0-1.fc31.src.rpm
python3-jaraco-functools.noarch: W: spelling-error Summary(en_US) stdlib -> std lib, std-lib, stolid
python3-jaraco-functools.noarch: W: unexpanded-macro %description -l C %{description}
python-jaraco-functools.src: W: spelling-error Summary(en_US) stdlib -> std lib, std-lib, stolid
python-jaraco-functools.src: W: spelling-error %description -l en_US stdlib -> std lib, std-lib, stolid
2 packages and 0 specfiles checked; 0 errors, 4 warnings.

Comment 7 Dan Radez 2019-04-05 16:55:51 UTC
re: both packages provide the same __init__.py in %{python3_sitelib}/jaraco (and compiled bytecode)

There is also a python-jaraco-packaging that supplies these too :/

Should I create a python-jaraco that has the toplevel jaraco dir and these dep on it?
if I did that which src tarball should I use? would it matter?

I suppose I could combine them all into a single jaraco package spec that pulls multiple source and has a subpackage for each?

is there another option that it conditionally installs that toplevel dir and __init__?

Comment 8 Robert-André Mauchin 🐧 2019-04-05 17:23:45 UTC
I don't know.

Could python-jaraco-packaging act as the main package that python-jaraco-functool and classes Requires for the __init__.py?

> is there another option that it conditionally installs that toplevel dir and __init__?

I don't see that possible.

Comment 9 Dan Radez 2019-04-05 18:47:28 UTC
jaraco-packaging is used for doc generation.
I don't think we want to force it to be installed for any of these packages.

What if jaraco-packaging provided python3-jaraco and all of these could dep on python3-jaraco
That was they wouldn't need to install packaging but packaging would own the subpackage that owned the top level dir and init file?

Comment 10 Robert-André Mauchin 🐧 2019-04-05 19:04:45 UTC
(In reply to Dan Radez from comment #9)
> jaraco-packaging is used for doc generation.
> I don't think we want to force it to be installed for any of these packages.
> 
> What if jaraco-packaging provided python3-jaraco and all of these could dep
> on python3-jaraco
> That was they wouldn't need to install packaging but packaging would own the
> subpackage that owned the top level dir and init file?

This seems a good idea.

Comment 11 Dan Radez 2019-04-05 19:24:47 UTC
Done, new spec and srpm uploaded that deps on python3-jaraco
subpackage has been added to jaraco-packaging and I'll add the dep to classes too.

Comment 12 Robert-André Mauchin 🐧 2019-04-05 19:47:48 UTC
 - You should not use 

%description -n python3-%{pkg_name}
	
%{description}

 in python-jaraco-packaging

That will return an empty description for your users.

Also space out your changelog entries by a newline (which is the standard used in mass rebuild).

In any package you used:

Requires:       python3dist(jaraco)

This won't work! Python3dist provides are detected with egg-info, there's no egg-info for your python3-jaraco subpackage so there is no Provides: python3.7dist(jaraco). You thus can't Requires it with python3dist(jaraco), you must Requires it like this:

Requires:       python3-jaraco

Fix it in python-jaraco-packaging python-jaraco-functools and python-jaraco-classes.

Comment 13 Dan Radez 2019-04-05 20:20:05 UTC
Thx for clarification. Fixed packaging.
repo isn't created yet for python-jaraco-classes
spec is fixed for classes and I've uploaded new spec and srpm for functools

Comment 14 Robert-André Mauchin 🐧 2019-04-05 20:27:06 UTC
LGTM, package approved.

Comment 15 Dan Radez 2019-04-05 20:37:19 UTC
Thx for all your help!

Comment 16 Igor Raits 2019-04-07 08:44:09 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-jaraco-functools


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