Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 86 lines (68 sloc) 1.972 kB
de92d4e @leto Start porting Tapir to use distutils instead of a Makefile
authored
1 #!/usr/bin/env parrot
2 # Copyright (C) 2009, Jonathan "Duke" Leto
3
4 =head1 NAME
5
6 setup.pir - Setup, build, test and install Tapir
7
8 =head1 DESCRIPTION
9
10 No Configure step, no Makefile generated.
11
12 See F<runtime/parrot/library/distutils.pir>.
13
14 =head1 USAGE
15
16 $ parrot setup.pir build
17 $ parrot setup.pir test
18 $ sudo parrot setup.pir install
19
20 =cut
21
22 .sub 'main' :main
23 .param pmc args
24 $S0 = shift args
25 load_bytecode 'distutils.pbc'
26
c7b4f83 @fperrad now distutils support pbc_merge
fperrad authored
27 .const 'Sub' test = 'test'
28 register_step('test', test)
29
de92d4e @leto Start porting Tapir to use distutils instead of a Makefile
authored
30 $P0 = new 'Hash'
31 $P0['name'] = 'tapir'
32 $P0['abstract'] = 'Fast TAP Harness written in PIR'
33 $P0['authority'] = 'http://github.com/leto'
34 $P0['description'] = 'Fast TAP Harness written in PIR'
35 $P1 = split ';', 'TAP;harness;testing'
36 $P0['keywords'] = $P1
37 $P0['license_type'] = 'Artistic License 2.0'
38 $P0['license_uri'] = 'http://www.perlfoundation.org/artistic_license_2_0'
c7b4f83 @fperrad now distutils support pbc_merge
fperrad authored
39 $P0['copyright_holder'] = "Jonathan \"Duke\" Leto"
de92d4e @leto Start porting Tapir to use distutils instead of a Makefile
authored
40 $P0['checkout_uri'] = 'git://github.com/leto/tapir.git'
41 $P0['browser_uri'] = 'http://github.com/leto/tapir'
42 $P0['project_uri'] = 'http://github.com/leto/tapir'
43
44 # build
c7b4f83 @fperrad now distutils support pbc_merge
fperrad authored
45 $P2 = new 'Hash'
05acfec @leto Refactor of the metadata file and setup.pir from fperrad++
authored
46 $P3 = split "\n", <<'SOURCES'
47 t/harness.pir
48 lib/Tapir/Parser.pir
49 lib/Tapir/Stream.pir
50 SOURCES
51 $S0 = pop $P3
52 $P2['tapir.pbc'] = $P3
c7b4f83 @fperrad now distutils support pbc_merge
fperrad authored
53 $P0['pbc_pir'] = $P2
54
55 $P5 = new 'Hash'
56 $P5['parrot-tapir'] = 'tapir.pbc'
57 $P0['exe_pbc'] = $P5
58 $P0['installable_pbc'] = $P5
de92d4e @leto Start porting Tapir to use distutils instead of a Makefile
authored
59
60 .tailcall setup(args :flat, $P0 :flat :named)
61 .end
62
c7b4f83 @fperrad now distutils support pbc_merge
fperrad authored
63 .sub 'test' :anon
64 .param pmc kv :slurpy :named
65 run_step('build', kv :flat :named)
66
67 .local pmc config
68 config = get_config()
69 $S0 = config['osname']
70 .local string cmd
71 unless $S0 == 'MSWin32' goto L1
72 cmd = 'tapir.exe'
73 goto L2
74 L1:
75 cmd = './tapir'
76 L2:
77 cmd .= ' t/*.t'
78 system(cmd, 1 :named('verbose'))
79 .end
80
de92d4e @leto Start porting Tapir to use distutils instead of a Makefile
authored
81 # Local Variables:
82 # mode: pir
83 # fill-column: 100
84 # End:
85 # vim: expandtab shiftwidth=4 ft=pir:
Something went wrong with that request. Please try again.