passthrough Makefile is deprecated; add BEDTools dependency
[bioperl-run.git] / Build.PL
blob365e585dfcba0eb7959f55a9b3865714279cbf81
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 requires => {
18 'perl' => '5.6.1',
19 'Bio::Root::Version' => '1.006900'
21 recommends => {
22 'Algorithm::Diff' => 0, # generating consensus protein family descriptions: Bio::Tools::Run::TribeMCL
23 'IPC::Run' => 0, # Glimmer and Genemark application wrappers: Bio::Tools::Run::Glimmer Bio::Tools::Run::Genemark
24 'IO::String' => 0, # generating Bio::Tree::Tree from strings: Bio::Tools::Run::Phylo::Phylip::Consense
25 'XML::Twig' => 0, # processing XML data: Bio::Tools::Run::EMBOSSacd
26 'File::Sort' => 0 # BEDTools
28 get_options => {
29 accept => { },
30 network => { }
32 auto_features => {
33 Network => {
34 description => "Enable tests that need an internet connection",
35 requires => { 'LWP::UserAgent' => 0 }
38 dynamic_config => 1,
39 #create_makefile_pl => 'passthrough'
42 my $accept = $build->args->{accept};
44 # Optionally have script files installed.
45 if ($accept ? 0 : $build->y_n("Install scripts? y/n", 'n')) {
46 my $files = $build->_find_file_by_type('PLS', 'scripts');
48 my $script_build = File::Spec->catdir($build->blib, 'script');
50 my @tobp;
51 while (my ($file, $dest) = each %$files) {
52 $dest = 'bp_'.File::Basename::basename($dest);
53 $dest =~ s/PLS$/pl/;
54 $dest = File::Spec->catfile($script_build, $dest);
55 $build->copy_if_modified(from => $file, to => $dest);
56 push @tobp, $dest;
59 $build->script_files(\@tobp);
62 # Do network tests?
63 my $do_network_tests = 0;
64 if ($build->args('network')) {
65 $do_network_tests = $build->feature('Network');
67 elsif ($build->feature('Network')) {
68 $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');
71 if ($do_network_tests) {
72 $build->notes(network => 1);
73 $build->log_info(" - will run internet-requiring tests\n");
74 my $use_email = $build->y_n("Do you want to run tests requiring a valid email address? y/n",'n');
75 if ($use_email) {
76 my $address = $build->prompt("Enter email address:");
77 $build->notes(email => $address);
80 else {
81 $build->notes(network => 0);
82 $build->log_info(" - will not run internet-requiring tests\n");
85 # Create the build script and exit
86 $build->create_build_script;
88 exit;