Updating Mauricio's email
[bioperl-run.git] / Build.PL
blob6c4fa0c1605df8e9921c7ad8d267e9b0d944149e
1 #!/usr/bin/perl
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->subclass(
11 code => q(
13 # add dist version to META files
14 sub get_metadata {
15 my ($self, %args) = @_;
16 my $metadata = $self->SUPER::get_metadata(%args);
18 if (exists $metadata->{provides}) {
19 my $ver = $self->dist_version;
20 my $pkgs = $metadata->{provides};
21 for my $p (keys %{$pkgs}) {
22 if (!exists($pkgs->{$p}->{'version'})) {
23 $pkgs->{$p}->{'version'} = $ver;
24 } else {
25 $self->log_warn("Note: Module $p has a set version: ".$pkgs->{$p}->{'version'}."\n")
26 if $pkgs->{$p}->{'version'} ne $ver;
30 return $metadata;
33 )->new(
34 dist_name => 'BioPerl-Run',
35 dist_version => '1.007003',
36 module_name => 'Bio::Run',
37 dist_author => 'BioPerl Team <bioperl-l@bioperl.org>',
38 dist_abstract => 'BioPerl-Run - wrapper toolkit',
39 license => 'perl',
40 config_requires => {
41 'Module::Build' => 0,
43 build_requires => {
44 'Bio::Root::Version' => '1.007000',
45 'Bio::Root::Test' => 0,
47 requires => {
48 'perl' => '5.6.1',
49 'Bio::Root::Version' => '1.007000',
50 'Bio::Root::Root' => 0,
52 recommends => {
53 'Bio::Cluster::SequenceFamily' => 0, # Bio::Tools::Run::TribeMCL
54 'Algorithm::Diff' => 0, # generating consensus protein family descriptions: Bio::Tools::Run::TribeMCL
55 'IPC::Run' => 0, # Glimmer and Genemark application wrappers: Bio::Tools::Run::Glimmer Bio::Tools::Run::Genemark
56 'IO::String' => 0, # generating Bio::Tree::Tree from strings: Bio::Tools::Run::Phylo::Phylip::Consense
57 'XML::Twig' => 0, # processing XML data: Bio::Tools::Run::EMBOSSacd
58 'File::Sort' => 0, # BEDTools
59 'Config::Any' => 0, # MCS, Match
60 'Bio::FeatureIO' => 0, # MCS, Match, Phastcons
61 #'SOAP::Lite' => 0.716, # A bug that affects SoapEU-unit.t tests was fixed in this version (many levels deep object throws error)
63 get_options => {
64 accept => { },
65 network => { },
66 install_scripts => { }
68 auto_features => {
69 Network => {
70 description => "Enable tests that need an internet connection",
71 requires => { 'LWP::UserAgent' => 0 }
74 dynamic_config => 1,
75 #create_makefile_pl => 'passthrough'
78 my $accept = $build->args->{accept};
80 # Optionally have script files installed.
81 if ($build->args('install_scripts') or $accept ? 0 : $build->y_n("Install scripts? y/n", 'n')) {
82 my $files = $build->_find_file_by_type('PLS', 'scripts');
84 my $script_build = File::Spec->catdir($build->blib, 'script');
86 my @tobp;
87 while (my ($file, $dest) = each %$files) {
88 $dest = 'bp_'.File::Basename::basename($dest);
89 $dest =~ s/PLS$/pl/;
90 $dest = File::Spec->catfile($script_build, $dest);
91 $build->copy_if_modified(from => $file, to => $dest);
92 push @tobp, $dest;
95 $build->script_files(\@tobp);
98 # Do network tests?
99 my $do_network_tests = 0;
100 if ($build->args('network')) {
101 $do_network_tests = $build->feature('Network');
103 elsif ($build->feature('Network')) {
104 $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');
107 if ($do_network_tests) {
108 $build->notes(network => 1);
109 $build->log_info(" - will run internet-requiring tests\n");
110 my $use_email = $build->y_n("Do you want to run tests requiring a valid email address? y/n",'n');
111 if ($use_email) {
112 my $address = $build->prompt("Enter email address:");
113 $build->notes(email => $address);
116 else {
117 $build->notes(network => 0);
118 $build->log_info(" - will not run internet-requiring tests\n");
121 # Create the build script and exit
122 $build->create_build_script;