classification
Title: pysetup --search should return non-zero when a dist is not installed and print a message stating the fact.
Type: behavior Stage: resolved
Components: Distutils2 Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: eric.araujo Nosy List: alexis, eric.araujo, kelsey.hightower, python-dev, tarek
Priority: normal Keywords: patch

Created on 2011-03-05 18:29 by kelsey.hightower, last changed 2011-07-29 13:45 by eric.araujo. This issue is now closed.

Files
File name Uploaded Description Edit
pysetup-search.patch kelsey.hightower, 2011-03-05 18:29
pysetup-search-new-cmds.patch kelsey.hightower, 2011-03-05 19:31 Updated patch based on the distutils2-new-cmdline repo
Messages (6)
msg130127 - (view) Author: Kelsey (kelsey.hightower) Date: 2011-03-05 18:29
I would like to make pysetup easier to work with when called from shell scripts or similar tools that wish to take action based on the exit code of the pysetup --search command. In this case return 0 if a match is found and 1 otherwise.

As an enhancement, print a message to stdout that the dist is not installed.

Example:

# pysetup -s Mako
Mako is not installed

# echo $?
1

Please review my patch in my d2 patch queue:
https://bitbucket.org/khightower/distutils2-patch-queue/qseries?apply=t&qs_apply=pysetup-search
msg130128 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2011-03-05 18:44
pysetup is currently under heavy refactoring -- see the  https://bitbucket.org/tarek/distutils2-new-cmdline clone if you want to help on this.

I am planning to merge it before the release, this week.
msg130130 - (view) Author: Kelsey (kelsey.hightower) Date: 2011-03-05 18:49
I will take a look, thanks.
msg130131 - (view) Author: Kelsey (kelsey.hightower) Date: 2011-03-05 19:31
Updated patch based on the distutils2-new-cmdline repo

https://bitbucket.org/khightower/distutils2-new-cmdline-mq/qseries?apply=t&qs_apply=pysetup-search-nonzero
msg141352 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-07-29 12:35
New changeset 88545218e155 by Éric Araujo in branch 'default':
Let pysetup list exit with a non-zero code when no result is found (#11409).
http://hg.python.org/cpython/rev/88545218e155
msg141377 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-07-29 13:45
Adapted and committed.
History
Date User Action Args
2011-07-29 13:45:13eric.araujosetstatus: open -> closed
versions: - 3rd party, Python 2.7, Python 3.2
messages: + msg141377

assignee: tarek -> eric.araujo
resolution: fixed
stage: resolved
2011-07-29 12:35:20python-devsetnosy: + python-dev
messages: + msg141352
2011-06-06 16:13:10eric.araujolinkissue12222 dependencies
2011-06-01 06:26:10terry.reedysetversions: - Python 2.6, Python 2.5, Python 3.1
2011-03-05 19:31:55kelsey.hightowersetfiles: + pysetup-search-new-cmds.patch
nosy: tarek, eric.araujo, alexis, kelsey.hightower
messages: + msg130131
2011-03-05 18:49:08kelsey.hightowersetnosy: tarek, eric.araujo, alexis, kelsey.hightower
messages: + msg130130
2011-03-05 18:44:06tareksetnosy: tarek, eric.araujo, alexis, kelsey.hightower
messages: + msg130128
2011-03-05 18:29:08kelsey.hightowercreate