File: build.py

package info (click to toggle)
obitools 1.2.13%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,652 kB
  • sloc: python: 18,199; ansic: 1,542; makefile: 98
file content (46 lines) | stat: -rw-r--r-- 1,143 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
'''
Created on 20 oct. 2012

@author: coissac
'''

from distutils.command.build import build as ori_build
from obidistutils.serenity.checksystem import is_mac_system

from distutils import log

class build(ori_build):
    
    def has_ctools(self):
        return self.distribution.has_ctools()

    def has_files(self):
        return self.distribution.has_files()

    def has_executables(self):
        return self.distribution.has_executables()
    
    def has_ext_modules(self):
        return self.distribution.has_ext_modules()
    
    def has_littlebigman(self):
        return True
    
    def has_pidname(self):
        return is_mac_system()

    def has_doc(self):
        return True
    
    
    sub_commands = [('littlebigman', has_littlebigman),
                    ('pidname',has_pidname),
                    ('build_ctools', has_ctools),
                    ('build_files', has_files),
                    ('build_cexe', has_executables)] \
                   + ori_build.sub_commands
                   
    def run(self):
        log.info('\n\nRunning obidistutils build process\n\n')
        ori_build.run(self)