Bug 808258 - Review Request: python-sh - Python module to simplify calling shell commands
Summary: Review Request: python-sh - Python module to simplify calling shell commands
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Ralph Bean
QA Contact: Fedora Extras Quality Assurance
: 832588 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2012-03-29 23:38 UTC by Andy Grover
Modified: 2012-07-16 17:01 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2012-07-10 16:24:42 UTC
Type: ---
rbean: fedora-review+
gwync: fedora-cvs+

Attachments (Terms of Use)

Description Andy Grover 2012-03-29 23:38:09 UTC
Spec URL: http://fedorapeople.org/~grover/new/python-sh.spec
SRPM URL: http://fedorapeople.org/~grover/new/python-sh-0.95-1.el6.src.rpm
Description: A Python module to simplify calling shell commands.
Also known as PBS, or Python Bash Scripting.

Upstream project is currently called "pbs". Due to "python-pbs" being taken for Fedora, upstream has agreed to python-sh as an acceptable alias, and may rename the project in the future. See https://github.com/amoffat/pbs/issues/28 .

Comment 1 Michael S. 2012-03-30 15:09:48 UTC

first, BuildRoot is no longer needed, unless you target EPEL 5

so does :
%clean with rm -Rf
rm -Rf in %install 

( cf https://fedoraproject.org/wiki/Packaging:Guidelines#BuildRoot_tag )

* using %{python_sitelib} mean that the directory will be owned by this rpm, and that should be avoid.

* BuildRequires:  python-devel python-setuptools

it is easier to review patch with 2 lines for each buildRequires ( IMHO )

and you should explicitely say if this is for python 2 or 3 ( https://fedoraproject.org/wiki/Packaging:Python#BuildRequires ), due to the current transition.

* there seems to be some test to run, but they are not run by %check, any reason ? 

* As a side note, I think you could try to convince upstream of pushing tarball to pypi as well, since having a tarball called "0.95" is rather ugly ( and I think this may be against the guideline : https://fedoraproject.org/wiki/Packaging:SourceURL ).

Comment 2 Andy Grover 2012-03-30 18:29:05 UTC
Hi Michael, issues addressed, updated files here:

spec: http://fedorapeople.org/~grover/new/python-sh.spec
srpm: http://fedorapeople.org/~grover/new/python-sh-0.95-2.el6.src.rpm

Comment 3 Terje Røsten 2012-04-01 16:11:37 UTC
> Description: A Python module to simplify calling shell commands.
> Also known as PBS, or Python Bash Scripting.
> Upstream project is currently called "pbs". Due to "python-pbs" being taken for
> Fedora, upstream has agreed to python-sh

Why not call the rpm package python-bash-scripting then?

Comment 4 Andy Grover 2012-04-03 00:52:08 UTC
(In reply to comment #3)
> > Description: A Python module to simplify calling shell commands.
> > Also known as PBS, or Python Bash Scripting.
> > 
> > Upstream project is currently called "pbs". Due to "python-pbs" being taken for
> > Fedora, upstream has agreed to python-sh
> Why not call the rpm package python-bash-scripting then?

Because that's not it's real name either. See


Upstream agreed to python-sh pkgname too, and may change upstream name to sh in the future:


Comment 5 Andy Grover 2012-05-03 18:45:20 UTC
Hi Michael, any more comments on the latest revision in comment 2?

Comment 6 Toshio Ernie Kuratomi 2012-06-15 23:11:34 UTC
*** Bug 832588 has been marked as a duplicate of this bug. ***

Comment 7 Toshio Ernie Kuratomi 2012-06-15 23:23:39 UTC
I noticed that another review request was opened by someone else for this package.  I've encouraged him to review this one instead.

I took a quick look since packages with conflciting names can often cause problems.  It looks like there's no file-level conflicts between this package and python-pbs as python-pbs uses a directory-based module and this package uses a file-based module but I'd very strongly recommend against shipping the pbs.py{,c,o} files.  If I was reviewing, I'd block the package on it.  The problem is that a system having both python-pbs and python-sh installed will not be able to import one or the other of the modules.

Simply moving the %{python_sitelib}/pbs.py{,c,o} files to %{python_sitelib}/sh.py{,c,o} instead of creating a symlink should resolve that.  Note that the egg-info for python-pbs is pbs_python and the egg-info for this package is python_pbs.  This is not a direct conflict but it is confusing... I'd recommend (but perhaps not block) this package on removing the python_pbs egg-info for this package.  Also regarding egg-info, you should probably ship a python_sh egg-info.  You can use a symlink or a mv depending on whether you're going to remove the python_pbs egginfo.

Comment 8 Ralph Bean 2012-06-16 00:26:04 UTC
Hi Andy.  I will take the review over if Michael doesn't mind but I'll wait a few days for him to respond before nabbing ownership.

I think the sooner we can get 'pbs' ported to 'sh' upstream, the better.

Comment 9 Michael S. 2012-06-16 08:17:13 UTC
You can take it, I forgot I started this review :/

Comment 10 Ralph Bean 2012-06-21 16:08:34 UTC
Thanks, Michael.  :)

Andy, let's wait just a little while for a response from amoffat on https://github.com/amoffat/pbs/pull/64  ; I'd really like his feedback.

If he's unresponsive, you can probably run that script yourself to setup a fork-in-name-only.  We should probably edit the script to denote in the description and README that python-sh is just a rename of the pbs module with links to the relevant upstream issues.  It'd be a shame to unnecessarily confuse developers.

Comment 11 Andy Grover 2012-06-21 19:00:28 UTC
Hi Ralph.

Even if upstream isn't receptive (it's been 6 days, how long were you thinking we should wait?), I don't know if we'd need to "fork", we could just run the translation (and add the note to the README saying what we did) both in the build process. It wouldn't be ideal, but it would let us move forward on getting this included, and could easily be removed if the issue is addressed upstream.

Also, I'm assuming you'd be ok with co-maintaining this with me? :)

Comment 12 Ralph Bean 2012-06-23 01:38:09 UTC
Hi Andy - that sounds good!  I'm all-in with co-maintaining this one.  :)

For formality's sake, can you run the script and patch the README like you said but also add a link back to this bug?  Upload a new release of the srpm and spec and I'll do the reviewer's duty.

Comment 13 Andy Grover 2012-06-28 21:59:43 UTC
Hi Ralph, thanks to you and amoffat, upstream released an updated tarball that should be 100% "sh" with no "pbs". Updated .spec and srpms:

spec: http://fedorapeople.org/~grover/new/python-sh.spec
srpm: http://fedorapeople.org/~grover/new/python-sh-0.107-1.fc17.src.rpm

Tested, seems to work fine, please review.

Comment 14 Ralph Bean 2012-06-29 17:10:47 UTC
Looks great.  APPROVED!

Package Review

- = N/A
x = Pass
! = Fail
? = Not evaluated

==== Generic ====
[x]: EXTRA Rpmlint is run on all installed packages.
     Note: No rpmlint messages.
[x]: EXTRA Spec file according to URL is the same as in SRPM.
[x]: MUST Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
[x]: MUST Package successfully compiles and builds into binary rpms on at
     least one supported primary architecture.
[x]: MUST %build honors applicable compiler flags or justifies otherwise.
[x]: MUST All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[x]: MUST Buildroot is not present
     Note: Unless packager wants to package for EPEL5 this is fine
[x]: MUST Package contains no bundled libraries.
[x]: MUST Changelog in prescribed format.
[x]: MUST Package has no %clean section with rm -rf %{buildroot} (or
     Note: Clean would be needed if support for EPEL is required
[x]: MUST Sources contain only permissible code or content.
[x]: MUST Each %files section contains %defattr if rpm < 4.4
     Note: Note: defattr macros not found. They would be needed for EPEL5
[x]: MUST Macros in Summary, %description expandable at SRPM build time.
[-]: MUST Package contains desktop file if it is a GUI application.
[x]: MUST Package requires other packages for directories it uses.
[x]: MUST Package uses nothing in %doc for runtime.
[x]: MUST Package is not known to require ExcludeArch.
[x]: MUST Permissions on files are set properly.
[x]: MUST Package does not contain duplicates in %files.
[x]: MUST Spec file lacks Packager, Vendor, PreReq tags.
[x]: MUST Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
     Note: rm -rf would be needed if support for EPEL5 is required
[x]: MUST Large documentation files are in a -doc subpackage, if required.
[x]: MUST 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 %doc.
[x]: MUST License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses found:
     "*No copyright* UNKNOWN", "MIT/X11 (BSD like)" For detailed output of
     licensecheck see file: /home/threebean/devel/FedoraReview/808258-python-
[x]: MUST Package consistently uses macros (instead of hard-coded directory
[x]: MUST Package is named using only allowed ascii characters.
[x]: MUST Package is named according to the Package Naming Guidelines.
[x]: MUST Package does not generate any conflict.
[x]: MUST Package obeys FHS, except libexecdir and /usr/target.
[x]: MUST Package must own all directories that it creates.
[x]: MUST Package does not own files or directories owned by other packages.
[x]: MUST Package installs properly.
[x]: MUST Requires correct, justified where necessary.
[x]: MUST Rpmlint is run on all rpms the build produces.
     Note: No rpmlint messages.
[x]: MUST Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: MUST Spec file is legible and written in American English.
[x]: MUST Spec file name must match the spec package %{name}, in the format
[-]: MUST Package contains a SysV-style init script if in need of one.
[x]: MUST File names are valid UTF-8.
[-]: MUST Useful -debuginfo package or justification otherwise.
[x]: SHOULD Reviewer should test that the package builds in mock.
[x]: SHOULD 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]: SHOULD Dist tag is present.
[x]: SHOULD No file requires outside of /etc, /bin, /sbin, /usr/bin,
[x]: SHOULD Final provides and requires are sane (rpm -q --provides and rpm -q
[x]: SHOULD Package functions as described.
[x]: SHOULD Latest version is packaged.
[x]: SHOULD Package does not include license text files separate from
[x]: SHOULD SourceX is a working URL.
[x]: SHOULD Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: SHOULD Package should compile and build into binary rpms on all supported
[x]: SHOULD %check is present and all tests pass.
[x]: SHOULD Packages should try to preserve timestamps of original installed
[x]: SHOULD Spec use %global instead of %define.

Checking: python-sh-0.107-1.fc17.src.rpm
2 packages and 0 specfiles checked; 0 errors, 0 warnings.

Rpmlint (installed packages)
# rpmlint python-sh
python-sh.noarch: I: enchant-dictionary-not-found en_US
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
# echo 'rpmlint-done:'

python-sh-0.107-1.fc17.noarch.rpm (rpmlib, GLIBC filtered):
    python(abi) = 2.7

    python-sh = 0.107-1.fc17

MD5-sum check
/home/threebean/devel/FedoraReview/808258-python-sh/upstream/sh-0.107.tar.gz :
  MD5SUM this package     : d92e8a7b5c729e3d4620a5964563ed54
  MD5SUM upstream package : d92e8a7b5c729e3d4620a5964563ed54

Generated by fedora-review 0.2.0git
External plugins:

Comment 15 Andy Grover 2012-06-29 17:55:19 UTC
New Package SCM Request
Package Name: python-sh
Short Description: Python module to simplify calling shell commands
Owners: grover ralph
Branches: f16 f17 el6

Comment 16 Gwyn Ciesla 2012-06-29 18:06:06 UTC
Git done (by process-git-requests).

Comment 17 Fedora Update System 2012-06-29 19:26:47 UTC
python-sh-0.107-1.fc16 has been submitted as an update for Fedora 16.

Comment 18 Fedora Update System 2012-06-29 19:26:59 UTC
python-sh-0.107-1.fc17 has been submitted as an update for Fedora 17.

Comment 19 Fedora Update System 2012-06-29 19:27:08 UTC
python-sh-0.107-1.el6 has been submitted as an update for Fedora EPEL 6.

Comment 20 Fedora Update System 2012-06-30 22:04:23 UTC
python-sh-0.107-1.fc17 has been pushed to the Fedora 17 testing repository.

Comment 21 Fedora Update System 2012-07-10 16:24:42 UTC
python-sh-0.107-1.fc16 has been pushed to the Fedora 16 stable repository.

Comment 22 Fedora Update System 2012-07-10 16:28:16 UTC
python-sh-0.107-1.fc17 has been pushed to the Fedora 17 stable repository.

Comment 23 Fedora Update System 2012-07-16 17:01:25 UTC
python-sh-0.107-1.el6 has been pushed to the Fedora EPEL 6 stable repository.

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