| Summary: | Review Request: python-more-itertools - Python library for efficient use of itertools utility in python | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Ranjan Maitra <itsme_410> |
| Component: | Package Review | Assignee: | Zbigniew Jędrzejewski-Szmek <zbyszek> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | rawhide | CC: | Marcin.Dulak, package-review, zbyszek |
| Target Milestone: | --- | Flags: | zbyszek:
fedora-review+
|
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-10-23 22:48: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: | |
|
Description
Ranjan Maitra
2016-10-02 14:37:17 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. 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.
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 New files posted: Spec URL: http://www.public.iastate.edu/~maitra/Fedora/more-itertools.spec SRPM URL: http://www.public.iastate.edu/~maitra/Fedora/python-more-itertools-2.2-2.fc24.src.rpm 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. 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? 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. Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/python-more-itertools 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 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 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 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 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 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 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. 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. 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. Please see bug #1336097 - it may be possible to build your package for EPEL7 |