~pida/vellum/trunk

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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Copyright (C) 2008 Zed A. Shaw.  You're free to reuse this file
# in your build scripts in anyway and remove the copyright 
# notice.

### @export "main" python
# This is a working build spec, but it is also an example
# so it consists of a lot more stuff than you would normally
# find in a real project.

imports [
    recipe(from 'scripts/testing' as 'testing')
    recipe(from 'scripts/dist' as 'dist')
    recipe(from 'scripts/sample' as 'sample')
    recipe(from 'doc/book' as 'book')
]

options(
        project "vellum"
        default 'tests'
        sudo 'sudo'
        version '0.2-dev'
        website '../zedshaw.com/output/projects/vellum'
        bzr.revision '.bzr/branch/last-revision'
        version.file 'vellum/version.py'

        setup(
            name 'vellum'
            version '0.2-dev'
            author 'Zed A. Shaw'
            description 'A flexible small make alternative for Python programmers.'
            author_email 'zedshaw@zedshaw.com'
            url 'http://www.zedshaw.com/projects/vellum'
            packages ['vellum' 'vellum.ext']
            scripts ['bin/vellum']
        )
)

depends(
        build ['tests' 'version.gen' 'dist.install' 'dist.sdist']
        commit ['dist.gen.setup'  'dist.clean' 'book.clean']
        tests ['testing.run']
        release ['build' 'dist.release' 'book.release' ]
)

targets(
        commit [
            $ bzr log --short > CHANGES
            $ bzr commit
            $ bzr push
        ]

        version.gen [
            py [
                |rev = open("%(bzr.revision)s").read().split()
                |ver = {"version": version, "rev": rev}
                |open("%(version.file)s", 'w').write(
                |    "VERSION=" + repr(ver))
            ]
        ]

        dist $ cp doc/manual-final.pdf %(website)s

        cloc [
           $ cloc --report-file=doc/test_cloc.txt --no3 --by-file tests
           $ cloc --report-file=doc/source_cloc.txt --no3 --by-file --force-lang=python,g vellum bin
           $ cat doc/*_cloc.txt
        ]
)