Bug 484597

Summary: Review Request: python-argparse - Optparse inspired command line parser for Python
Product: [Fedora] Fedora Reporter: Terje Røsten <terje.rosten>
Component: Package ReviewAssignee: Susi Lehtola <susi.lehtola>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: a.badger, fedora-package-review, notting, ruben, susi.lehtola
Target Milestone: ---Flags: susi.lehtola: fedora-review+
kevin: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-11 18:38:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 484598    

Description Terje Røsten 2009-02-08 20:58:04 UTC
spec: http://terjeros.fedorapeople.org/python-argparse/python-argparse.spec
srpm: http://terjeros.fedorapeople.org/python-argparse/python-argparse-0.8.0-1.fc10.src.rpm
koji: http://koji.fedoraproject.org/koji/taskinfo?taskID=1113741

Description:

The argparse module is an optparse-inspired command line parser that
improves on optparse by:
 * handling both optional and positional arguments
 * supporting parsers that dispatch to sub-parsers
 * producing more informative usage messages
 * supporting actions that consume any number of command-line args
 * allowing types and actions to be specified with simple callables 
    instead of hacking class attributes like STORE_ACTIONS or CHECK_METHODS 

as well as including a number of other more minor improvements on the
optparse API.

Comment 1 Susi Lehtola 2009-02-10 07:40:32 UTC

Hmm, why do you BR: python-setuptools if you don't use it?
Shouldn't the build and install phases look like

%build
%{__python} -c 'import setuptools; execfile("setup.py")' build

%install
rm -rf %{buildroot}
%{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --
root %{buildroot}

Comment 2 Susi Lehtola 2009-02-10 08:02:52 UTC
Nevermind, the package itself uses setuptools and thus the above is not necessary.

However, you might be missing one %install line; according to the Python packaging guidelines (PPG)

"If your module is using distutils or setuptools, use the following commands during %install:

%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT"

On the other hand, the package builds the .pyc and .pyo files with the one command you have. Maybe you can enlighten me about the effect of the -O1 switch?

Suggestions:

- Drop BR on python devel and change BR from python-setuptools to python-setuptools-devel as in PPG.

- Change %SOURCE0 line to use %{version} (and maybe %{oname} also?).

- Add a line break before %description and delete the one after it to improve legibility.

------------

Package adheres to Packaging Review Guidelines.

APPROVED

Comment 3 Terje Røsten 2009-02-10 17:21:45 UTC
-O1 creates *.pyo such that these will be present in the package and not
created on local fs when script are executed, which will cause problems when the package is updated or removed.

Will fix your another recommendations.


Thanks for the quick review!


New Package CVS Request
=======================
Package Name: python-argparse
Short Description: Optparse inspired command line parser for Python
Owners: terjeros
Branches: F-9 F-10
InitialCC:

Comment 4 Kevin Fenzi 2009-02-10 22:15:27 UTC
cvs done.

Comment 5 Terje Røsten 2009-02-11 18:38:35 UTC
Imported, built and and pending in bodhi.

Comment 6 Terje Røsten 2009-02-11 18:44:24 UTC
*** Bug 462505 has been marked as a duplicate of this bug. ***

Comment 7 Toshio Ernie Kuratomi 2010-02-09 23:40:42 UTC
Requesting EPEL-5 branch.  Emailed with Terje and he said it would be fine for me to take ownership of that branch.

Package Change Request
======================
Package Name: python-argparse
New Branches: EL-5
Owners: toshio

Comment 8 Kevin Fenzi 2010-02-11 06:03:34 UTC
cvs done.