[Python-checkins] python/dist/src/Lib/plat-mac pimp.py,1.22,1.23

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
2003年5月29日 15:07:29 -0700


Update of /cvsroot/python/python/dist/src/Lib/plat-mac
In directory sc8-pr-cvs1:/tmp/cvs-serv20960/Lib/plat-mac
Modified Files:
	pimp.py 
Log Message:
- Get the database from a different place.
- Added support for multi-line descriptions. Doesn't look nice
yet in Package Manager.
Index: pimp.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/pimp.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** pimp.py	28 May 2003 18:56:30 -0000	1.22
--- pimp.py	29 May 2003 22:07:27 -0000	1.23
***************
*** 45,49 ****
 DEFAULT_BUILDDIR='/tmp'
 DEFAULT_INSTALLDIR=distutils.sysconfig.get_python_lib()
! DEFAULT_PIMPDATABASE="http://homepages.cwi.nl/~jack/pimp/pimp-%s.plist" % distutils.util.get_platform()
 
 def _cmd(output, dir, *cmditems):
--- 45,49 ----
 DEFAULT_BUILDDIR='/tmp'
 DEFAULT_INSTALLDIR=distutils.sysconfig.get_python_lib()
! DEFAULT_PIMPDATABASE="http://homepages.cwi.nl/~jack/pimp-0.2/pimp-%s.plist" % distutils.util.get_platform()
 
 def _cmd(output, dir, *cmditems):
***************
*** 267,271 ****
 % (self._version, PIMP_VERSION))
 self._maintainer = dict.get('Maintainer', '')
! self._description = dict.get('Description', '')
 self._appendPackages(dict['Packages'])
 others = dict.get('Include', [])
--- 267,271 ----
 % (self._version, PIMP_VERSION))
 self._maintainer = dict.get('Maintainer', '')
! self._description = dict.get('Description', '').strip()
 self._appendPackages(dict['Packages'])
 others = dict.get('Include', [])
***************
*** 391,395 ****
 def version(self): return self._dict.get('Version')
 def flavor(self): return self._dict.get('Flavor')
! def description(self): return self._dict['Description']
 def homepage(self): return self._dict.get('Home-page')
 def downloadURL(self): return self._dict.get('Download-URL')
--- 391,395 ----
 def version(self): return self._dict.get('Version')
 def flavor(self): return self._dict.get('Flavor')
! def description(self): return self._dict['Description'].strip()
 def homepage(self): return self._dict.get('Home-page')
 def downloadURL(self): return self._dict.get('Download-URL')
***************
*** 826,830 ****
 pkg = db.find(pkgname)
 if pkg:
! description = pkg.description()
 pkgname = pkg.fullname()
 else:
--- 826,830 ----
 pkg = db.find(pkgname)
 if pkg:
! description = pkg.description().split('\r\n')[0]
 pkgname = pkg.fullname()
 else:
***************
*** 837,840 ****
--- 837,843 ----
 except KeyError:
 pass
+ description = pkg.description()
+ description = '\n\t\t\t\t\t'.join(description.split('\r\n'))
+ print "\tDescription:\t%s" % description
 elif mode =='status':
 if not args:

AltStyle によって変換されたページ (->オリジナル) /