~ubuntu-branches/ubuntu/karmic/quodlibet/karmic

« back to all changes in this revision

Viewing changes to gdist/man.py

  • Committer: Bazaar Package Importer
  • Author(s): Andres Rodriguez
  • Date: 2009-07-27 14:02:54 UTC
  • mfrom: (2.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20090727140254-zxutnf2kkhtpubnp
Tags: 2.1-2ubuntu1
* Resync from debian unstable (LP: #401965)
* debian/patches:
  - fix-context-crashes.patch: Dropped. Included Upstream.
  - 60-popen2-deprecated.patch: Dropped. Included Upstream.
* debian/quodlibet-ext.install: Changed 'site-packages' to '*-packages'.
* debian/rules: Changed 'site-packages' to '*-packages'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 
13
13
import os
14
14
 
 
15
from distutils.util import change_root
15
16
from gdist.core import GCommand
16
17
 
17
18
class install_man(GCommand):
24
25
 
25
26
    man_pages = None
26
27
    prefix = None
 
28
    root = None
27
29
 
28
30
    def finalize_options(self):
29
31
        GCommand.finalize_options(self)
30
 
        self.set_undefined_options('install', ('install_base', 'prefix'))
 
32
        self.set_undefined_options('install', ('root', 'root'), ('install_base', 'prefix'))
31
33
        self.man_pages = self.distribution.man_pages
32
34
        for man_page in self.man_pages:
33
35
            if not man_page[-1].isdigit():
35
37
 
36
38
    def run(self):
37
39
        basepath = os.path.join(self.prefix, 'share', 'man')
 
40
        if self.root != None:
 
41
          basepath = change_root(self.root, basepath)
38
42
        self.mkpath(basepath)
39
43
        for man_page in self.man_pages:
40
44
            manpath = os.path.join(basepath, "man" + man_page[-1])