Bug 1381029 - Review Request: python-more-itertools - Python library for efficient use of itertools utility in python
Summary: Review Request: python-more-itertools - Python library for efficient use of i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Zbigniew Jędrzejewski-Szmek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-02 14:37 UTC by Ranjan Maitra
Modified: 2016-12-08 23:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-23 22:48:53 UTC
Type: ---
Embargoed:
zbyszek: fedora-review+


Attachments (Terms of Use)

Description Ranjan Maitra 2016-10-02 14:37:17 UTC
Spec URL: http://www.public.iastate.edu/~maitra/Fedora/more-itertools.spec
SRPM URL: http://www.public.iastate.edu/~maitra/Fedora/more-itertools-2.2-1.fc24.src.rpm
Description: more-itertools is the opensource python library that wraps around itertools. The package also includes implementations of the recipes from the itertools documentation. 

Please see https://pythonhosted.org/more-itertools/index.html for documentation.

Fedora Account System Username: aarem

Comment 1 Zbigniew Jędrzejewski-Szmek 2016-10-05 03:30:22 UTC
Please have a look at the python packaging guidelines. Try the template from https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file.

The most obvious issues:
- this is a python library, the package should be called python-more-itertools
- python3 must be supported
- description should be wrapped to 72-80 columns
- please start from the template linked above, that will make many things simpler and more correct.

Comment 2 Ranjan Maitra 2016-10-05 13:13:18 UTC
I am having a problem with the new SPEC file. It does not compile. Here is the error I get. 

File "/usr/lib/python3.5/more.py", line 162
    min_or_max = partial(max if reverse else min, key=lambda (a, b): a)
                                                             ^
SyntaxError: invalid syntax

I have uploaded the new spec file here:

$ fpaste  more-itertools.spec 
Uploading (2.6KiB)...
http://paste.fedoraproject.org/444104/67316914/ -> https://paste.fedoraproject.org/444104/67316914

Any suggestions would be appreciated.

Comment 3 Zbigniew Jędrzejewski-Szmek 2016-10-05 18:33:12 UTC
Tuple unpacking in parameter lists is gone in python3. But 2to3 takes care of the translation. Unfortunately it seems you need a separate build dirs for the two versions. It seem easiest to just copy the sources twice:

# spec file for package python-more-itertools
# https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec
%global srcname more-itertools
%global sum Python library for efficient use of itertools utility

Name:           python-%{srcname}
Version:        2.2
Release:        1%{?dist}
Summary:        %{sum}
License:        MIT
URL:            https://github.com/erikrose/more-itertools
Source0:        https://pypi.python.org/packages/3d/4d/5900efaab46680e3c6c7a2fd87e4531f87e101ec35f6941621dc7f097e82/%{srcname}-%{version}.tar.gz
BuildArch:      noarch
BuildRequires:  python-devel
BuildRequires:  python-nose
BuildRequires:  python3-devel
BuildRequires:  python3-nose

%description
Opensource python library wrapping around itertools. Package also includes
implementations of the recipes from the itertools documentation.

See https://pythonhosted.org/more-itertools/index.html for documentation.

%package -n python2-%{srcname}
Summary:        %{sum}
%{?python_provide:%python_provide python2-%{srcname}}

%description -n python2-%{srcname}
Opensource python library wrapping around itertools. Package also includes
implementations of the recipes from the itertools documentation.

See https://pythonhosted.org/more-itertools/index.html for documentation.

%package -n python3-%{srcname}
Summary:        %{sum}
%{?python_provide:%python_provide python2-%{srcname}}

%description -n python3-%{srcname}
Opensource python library wrapping around itertools. Package also includes
implementations of the recipes from the itertools documentation.

See https://pythonhosted.org/more-itertools/index.html for documentation.

%prep
%autosetup -n %{srcname}-%{version} -a0

%build
%py2_build
(cd more-itertools-%{version}/ && %py3_build)

%install
%py2_install
(cd more-itertools-%{version}/ && %py3_install)

%check
%{__python2} -m nose build/lib/ -v
%{__python3} -m nose more-itertools-%{version}/build/lib/ -v

%files -n python2-%{srcname}
%license LICENSE
%doc README.rst PKG-INFO
%{python2_sitelib}/more_itertools/
%{python2_sitelib}/more_itertools-%{version}-py%{python2_version}.egg-info

%files -n python3-%{srcname}
%license LICENSE
%doc README.rst PKG-INFO
%{python3_sitelib}/more_itertools/
%{python3_sitelib}/more_itertools-%{version}-py%{python3_version}.egg-info

%changelog
* Wed Oct 5 2016 aarem AT fedoraproject DOT org - 2.2-2
- initial packaging of 2.2 version

Comment 5 Zbigniew Jędrzejewski-Szmek 2016-10-08 07:08:55 UTC
The spec file name must much package name.

Consider using a macro for the description:
%global _description \
text of the description here \
blah blah blah

%description %_description

%description -n python2-... %_description

etc.

%python_provide for python3 subpackage has wrong version, and generated Provides are wrong.

Comment 6 Ranjan Maitra 2016-10-08 13:45:39 UTC
New spec files uploaded:


Spec URL: http://www.public.iastate.edu/~maitra/Fedora/python-more-itertools.spec
SRPM URL: http://www.public.iastate.edu/~maitra/Fedora/python-more-itertools-2.2-3.fc24.src.rpm



However, my mock build on koji has problems for F23 and EPEL7: builds fine without error for F24, F25 and rawhide. What is the problem with the provides?
Here is the error with F23: I think the issue is possibly similar with EPEL7.

-- could not init mock buildroot, mock exited with status 30; see root.log for more information

-- 


Mock Version: 1.2.21
ENTER ['do'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target noarch --nodeps /builddir/build/SPECS/python-more-itertools.spec'], timeout=172800printOutput=Falsegid=425shell=Falseuser='mockbuild'chrootPath='/var/lib/mock/epel7-build-6615543-648585/root'env={'TERM': 'vt100', 'LANG': 'en_US.UTF-8', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'SHELL': '/bin/bash', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'HOME': '/builddir', 'HOSTNAME': 'mock'}logger=<mockbuild.trace_decorator.getLog object at 0x7f666f779da0>uid=1000)
Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target noarch --nodeps /builddir/build/SPECS/python-more-itertools.spec'] with env {'TERM': 'vt100', 'LANG': 'en_US.UTF-8', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'SHELL': '/bin/bash', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'HOME': '/builddir', 'HOSTNAME': 'mock'} and shell False
error: line 34: Unknown tag: %python_provide: ERROR: python3-more-itertools not recognized.
Building target platforms: noarch
Building for target noarch
Child return code was: 1
EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/mockbuild/trace_decorator.py", line 88, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.5/site-packages/mockbuild/util.py", line 562, in do
    raise exception.Error("Command failed. See logs for output.\n # %s" % (command,), child.returncode)
mockbuild.exception.Error: Command failed. See logs for output.
 # bash --login -c /usr/bin/rpmbuild -bs --target noarch --nodeps /builddir/build/SPECS/python-more-itertools.spec

-----

Thanks for any more helpful suggestions?

Comment 7 Zbigniew Jędrzejewski-Szmek 2016-10-09 12:17:51 UTC
The package builds fine in F23 mock for me, and also now in koji scratch (http://koji.fedoraproject.org/koji/taskinfo?taskID=16005364). Yesterday there was some issue with F23 koji package set, maybe your build failure was caused by that.

Review:
+ package name is OK
+ license is aceptable (MIT)
+ license is specified correctly
+ latest version
+ python packaging template is used
+ %python_provide is used
+ provides/requires look OK
+ builds and installs OK
+ %check passes

Package is APPROVED.

Comment 8 Patrick Uiterwijk 2016-10-11 12:05:37 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/python-more-itertools

Comment 9 Fedora Update System 2016-10-13 03:52:05 UTC
python-more-itertools-2.2-3.fc23 has been pushed to the Fedora 23 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-2016-1ea8ae0b3f

Comment 10 Fedora Update System 2016-10-13 04:52:24 UTC
python-more-itertools-2.2-3.fc24 has been pushed to the Fedora 24 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-2016-f96eca6ede

Comment 11 Fedora Update System 2016-10-13 05:52:48 UTC
python-more-itertools-2.2-3.fc25 has been pushed to the Fedora 25 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-2016-4a7838446f

Comment 12 Fedora Update System 2016-10-16 00:56:10 UTC
python-more-itertools-2.2-4.fc23 has been pushed to the Fedora 23 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-2016-194f805855

Comment 13 Fedora Update System 2016-10-16 00:56:36 UTC
python-more-itertools-2.2-4.fc24 has been pushed to the Fedora 24 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-2016-8c6ddc739d

Comment 14 Fedora Update System 2016-10-16 01:55:42 UTC
python-more-itertools-2.2-4.fc25 has been pushed to the Fedora 25 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-2016-f4b339a351

Comment 15 Fedora Update System 2016-10-23 22:48:53 UTC
python-more-itertools-2.2-4.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2016-10-23 22:53:51 UTC
python-more-itertools-2.2-4.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2016-10-24 02:48:30 UTC
python-more-itertools-2.2-4.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 marcindulak 2016-12-08 23:13:27 UTC
Please see bug #1336097 - it may be possible to build your package for EPEL7


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