Supply TEMPLATE and SUFFIX for temporary query sequence files.
[bioperl-run.git] / Build.PL
blobe004636211615170a3d0c0e5821c33c76dcb70be
1 #!/usr/bin/perl -w
3 # This is a Module::Build script for BioPerl-Run installation.
4 # See http://search.cpan.org/~kwilliams/Module-Build/lib/Module/Build.pm
6 use strict;
7 use warnings;
8 use Module::Build;
10 my $build = Module::Build->new(
11 dist_name => 'BioPerl-Run',
12 dist_version => '1.006900',
13 module_name => 'Bio::Run',
14 dist_author => 'BioPerl Team <bioperl-l@bioperl.org>',
15 dist_abstract => 'BioPerl-Run - wrapper toolkit',
16 license => 'perl',
17 config_requires => {
18 'Module::Build' => 0,
20 build_requires => {
21 'Bio::Root::Version' => '1.006900',
22 'Bio::Root::Test' => 0,
24 requires => {
25 'perl' => '5.6.1',
26 'Bio::Root::Version' => '1.006900',
27 'Bio::Root::Root' => 0,
29 recommends => {
30 'Algorithm::Diff' => 0, # generating consensus protein family descriptions: Bio::Tools::Run::TribeMCL
31 'IPC::Run' => 0, # Glimmer and Genemark application wrappers: Bio::Tools::Run::Glimmer Bio::Tools::Run::Genemark
32 'IO::String' => 0, # generating Bio::Tree::Tree from strings: Bio::Tools::Run::Phylo::Phylip::Consense
33 'XML::Twig' => 0, # processing XML data: Bio::Tools::Run::EMBOSSacd
34 'File::Sort' => 0, # BEDTools
35 'Config::Any' => 0, # MCS, Match
36 'SOAP::Lite' => 0.716, # A bug that affects SoapEU-unit.t tests was fixed in this version (many levels deep object throws error)
38 get_options => {
39 accept => { },
40 network => { },
41 install_scripts => { }
43 auto_features => {
44 Network => {
45 description => "Enable tests that need an internet connection",
46 requires => { 'LWP::UserAgent' => 0 }
49 dynamic_config => 1,
50 #create_makefile_pl => 'passthrough'
53 my $accept = $build->args->{accept};
55 # Optionally have script files installed.
56 if ($build->args('install_scripts') or $accept ? 0 : $build->y_n("Install scripts? y/n", 'n')) {
57 my $files = $build->_find_file_by_type('PLS', 'scripts');
59 my $script_build = File::Spec->catdir($build->blib, 'script');
61 my @tobp;
62 while (my ($file, $dest) = each %$files) {
63 $dest = 'bp_'.File::Basename::basename($dest);
64 $dest =~ s/PLS$/pl/;
65 $dest = File::Spec->catfile($script_build, $dest);
66 $build->copy_if_modified(from => $file, to => $dest);
67 push @tobp, $dest;
70 $build->script_files(\@tobp);
73 # Do network tests?
74 my $do_network_tests = 0;
75 if ($build->args('network')) {
76 $do_network_tests = $build->feature('Network');
78 elsif ($build->feature('Network')) {
79 $do_network_tests = $accept ? 0 : $build->y_n("Do you want to run tests that require connection to servers across the internet\n(likely to cause some failures)? y/n", 'n');
82 if ($do_network_tests) {
83 $build->notes(network => 1);
84 $build->log_info(" - will run internet-requiring tests\n");
85 my $use_email = $build->y_n("Do you want to run tests requiring a valid email address? y/n",'n');
86 if ($use_email) {
87 my $address = $build->prompt("Enter email address:");
88 $build->notes(email => $address);
91 else {
92 $build->notes(network => 0);
93 $build->log_info(" - will not run internet-requiring tests\n");
96 # Create the build script and exit
97 $build->create_build_script;
99 exit;