Ignore:
Timestamp:
25-05-07 15:57:15 (6 years ago)
Author:
thomas
Message:
  • moap/util/deps.py: Use Distro.distributor as prefix for installation methods. Add dependency installation info for Ubuntu for genshi and RDF. Fixes #241.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/moap/util/deps.py

    r252 r253  
    3131            return m(distro) 
    3232 
    33     def fedora_yum(self, packageName): 
     33    def FedoraCore_yum(self, packageName): 
    3434        """ 
    3535        Returns a string explaining how to install the given package. 
     
    3737        return "On Fedora, you can install %s with:\n" \ 
    3838                "su -c \"yum install %s\"" % (self.module, packageName) 
     39 
     40    def Ubuntu_apt(self, packageName): 
     41        """ 
     42        Returns a string explaining how to install the given package. 
     43        """ 
     44        return "On Ubuntu, you can install %s with:\n" \ 
     45                "sudo apt-get install %s" % (self.module, packageName) 
    3946 
    4047class RDF(Dependency): 
     
    4653        return "python-redland is not yet available in Fedora Extras.\n" 
    4754 
     55    def Ubuntu_install(self, distro): 
     56        return self.Ubuntu_apt('python-librdf') 
     57 
    4858class Cheetah(Dependency): 
    4959    module = 'Cheetah' 
     
    5363    def FedoraCore_install(self, distro): 
    5464        if distro.atLeast('4'): 
    55             return self.fedora_yum('python-cheetah') 
     65            return self.FedoraCore_yum('python-cheetah') 
    5666 
    5767        return "python-cheetah is only available in Fedora 4 or newer.\n" 
     
    6474    def FedoraCore_install(self, distro): 
    6575        return "genshi is not yet available in Fedora Extras.\n" 
     76 
     77    def Ubuntu_install(self, distro): 
     78        return self.Ubuntu_apt('python-genshi') 
    6679 
    6780class pygoogle(Dependency): 
     
    88101 
    89102    def FedoraCore_install(self, distro): 
    90         return self.fedora_yum('ctags') 
     103        return self.FedoraCore_yum('ctags') 
    91104 
    92105def handleImportError(exception): 
Note: See TracChangeset for help on using the changeset viewer.