Bug 484597 - Review Request: python-argparse - Optparse inspired command line parser for Python
Review Request: python-argparse - Optparse inspired command line parser for ...
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Susi Lehtola
Fedora Extras Quality Assurance
: 462505 (view as bug list)
Depends On:
Blocks: 484598
  Show dependency treegraph
Reported: 2009-02-08 15:58 EST by Terje Røsten
Modified: 2010-02-11 01:03 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-02-11 13:38:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
susi.lehtola: fedora‑review+
kevin: fedora‑cvs+

Attachments (Terms of Use)

  None (edit)
Description Terje Røsten 2009-02-08 15:58:04 EST
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


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 02:40:32 EST

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

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

rm -rf %{buildroot}
%{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --
root %{buildroot}
Comment 2 Susi Lehtola 2009-02-10 03:02:52 EST
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?


- 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.

Comment 3 Terje Røsten 2009-02-10 12:21:45 EST
-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
Comment 4 Kevin Fenzi 2009-02-10 17:15:27 EST
cvs done.
Comment 5 Terje Røsten 2009-02-11 13:38:35 EST
Imported, built and and pending in bodhi.
Comment 6 Terje Røsten 2009-02-11 13:44:24 EST
*** Bug 462505 has been marked as a duplicate of this bug. ***
Comment 7 Toshio Ernie Kuratomi 2010-02-09 18:40:42 EST
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 01:03:34 EST
cvs done.

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