14
14
use Bio::Root::Build;
16
# XML::SAX::RTF doesn't work with BioPerl, at all, nada, zilch.
18
# Since we're running into this now on CPAN Testers, catch it up front and
21
# See: https://rt.cpan.org/Ticket/Display.html?id=5943
22
# https://redmine.open-bio.org/issues/2975
24
{ eval { require XML::SAX; 1; };
27
if (grep {$_->{Name} =~ 'XML::SAX::RTF'} @{XML::SAX->parsers()}) {
30
############################# WARNING #############################
32
XML::SAX::RTF is not XML::SAX-compliant but is registered as an
33
XML::SAX parser. If used as the primary parser, modules requiring
34
XML::SAX will NOT work. Please install another XML::SAX-compliant
35
module and modify your local ParserDetails.ini file per XML::SAX
36
docs to remove references to XML::SAX::RTF.
38
############################# WARNING #############################
48
# AcePerl support is deprecated, per LDS - cjfields - 5-5-2011
51
# 'Access of ACeDB database/Bio::DB::Ace,Bio::DB::GFF::Adaptor::ace'],
53
'Algorithm::Munkres' => [0,
54
'Phylogenetic Networks/Bio::PhyloNetwork'],
56
'Array::Compare' => [0,
57
'Phylogenetic Networks/Bio::PhyloNetwork'],
60
'GenBank->GFF3/bp_genbank2gff3.pl'],
62
# this won't actually install due to circular dep, but we have no way of
63
# doing a post-install the [circular dependency!] specifies it is only
64
# installed on explicit request for this specific module, not when simply
65
# choosing to install 'all' modules
67
#'Bio::ASN1::EntrezGene' => [0,
68
# 'Parsing entrezgene/Bio::SeqIO::entrezgene [circular dependency!]'],
71
'Cloning objects/Bio::Tools::Primer3'],
73
'Convert::Binary::C' => [0,
74
'Strider functionality/Bio::SeqIO::strider'],
77
'OO-based exception handling (very optional)/Bio::Root::Exception'],
80
'Alignment graphic output/Bio::Align::Graphics'],
83
'Phylogenetic Networks, ontology engine implementation, contig analysis'.
84
'/Bio::PhyloNetwork,Bio::Ontology::SimpleGOEngine::GraphAdaptor,'.
85
'Bio::Assembly::Tools::ContigSpectrum'],
88
'Phylogenetic Network Visulization/Bio::PhyloNetwork::GraphViz'],
90
'HTML::Entities' => [0,
91
'Remote analysis POST submissions/Bio::SearchIO::blastxml'],
93
'HTML::HeadParser' => [3,
94
'Parsing <HEAD> section of HTML docs/Bio::Tools::Analysis::DNA::ESEfinder'],
96
'HTTP::Request::Common' => [0,
97
'GenBank+GenPept sequence retrieval, remote http Blast jobs'.
98
'/Bio::DB::*,Bio::Tools::Run::RemoteBlast,'.
99
'Bio::Tools::Analysis::Protein*,Bio::Tools::Analysis::DNA*'],
101
'List::MoreUtils' => [0,
102
'Back- or reverse-translation of sequences/'.
103
'Bio::Tools::SeqPattern,Bio::Tools::SeqPattern::BackTranslate'],
105
'LWP::UserAgent' => [0,
106
'Remote access/Bio::DB::*,Bio::Tools::Run::RemoteBlast,Bio::WebAgent'],
108
'Math::Random' => [0,
109
'Random Phylogenetic Networks/Bio::PhyloNetwork::RandomFactory'],
111
'PostScript::TextBlock' => [0,
112
'EPS output/Bio::Tree::Draw::Cladogram'],
115
'Proper operation/Bio::Tree::Compatible'],
118
'Bibliographic queries/Bio::DB::Biblio::soap'],
120
'Sort::Naturally' => [0,
121
'Sort lexically, but sort numeral parts numerically/'.
122
'Bio::Assembly::IO::ace,Bio::Assembly::IO::tigr'],
124
'Spreadsheet::ParseExcel' => [0,
125
'Parsing Excel files/Bio::SeqIO::excel'],
128
'Storing sequence objects in local file cache/'.
129
'Bio::DB::FileCache,Bio::SeqFeature::Collection,Bio::PopGen::HtSNP,'.
130
'Bio::PopGen::TagHaplotype,Bio::DB::GFF::Adaptor::berkeleydb'],
133
'Creating SVG images/Bio::Draw::Pictogram'],
135
'SVG::Graph' => [0.01,
136
'Creating SVG images/Bio::TreeIO::svggraph'],
138
'Text::ParseWords' => [0,
139
'Test scripts/Bio::DB::SeqFeature::Store::FeatureFileLoader'],
142
'Dealing with web resources/Bio::FeatureIO::gff,Bio::FeatureIO::interpro,'.
143
'Bio::DB::Biblio::eutils,Bio::DB::EUtilParameters,'.
144
'Bio::DB::Query::GenBank,Bio::DB::NCBIHelper,Bio::SeqFeature::Annotated'],
146
'XML::DOM::XPath' => [0.13,
147
'parsing interpro features/Bio::FeatureIO::interpro'],
150
'parsing xml/Bio::Biblio::IO::medlinexml'],
152
'XML::Parser::PerlSAX' => [0,
153
'Parsing XML/Bio::SeqIO::tinyseq,Bio::SeqIO::game::gameSubs,',
154
'Bio::OntologyIO::InterProParser,Bio::ClusterIO::dbsnp'],
157
'Parsing XML/Bio::SearchIO::blastxml,Bio::SeqIO::tigrxml,Bio::SeqIO::bsml_sax'],
159
'XML::SAX::Writer' => [0,
160
'Writing XML/Bio::SeqIO::tigrxml'],
163
'Reading custom XML/Bio::Tools::EUtilities,Bio::DB::HIV,Bio::DB::Query::HIVQuery'],
166
'Parsing XML/Bio::Variation::IO::xml,Bio::DB::Taxonomy::entrez,'.
167
'Bio::DB::Biblio::eutils'],
169
'XML::Writer' => [0.4,
170
'Parsing and writing XML/Bio::SeqIO::agave,Bio::SeqIO::game::gameWriter,'.
171
'Bio::SeqIO::chadoxml,Bio::SeqIO::tinyseq,Bio::Variation::IO::xml,'.
172
'Bio::SearchIO::Writer::BSMLResultWriter'],
177
my @drivers = available_drivers();
20
179
# Set up the Bio::Root::Build object
21
180
my $build = Bio::Root::Build->new(
22
181
module_name => 'Bio',
25
184
dist_author => 'BioPerl Team <bioperl-l@bioperl.org>',
26
185
dist_abstract => 'Bioinformatics Toolkit',
27
186
license => 'perl',
187
no_index => {'dir' => [qw(examples/root/lib)]},
29
189
'perl' => '5.6.1',
190
'IO::String' => 0, # why is this required?
191
'DB_File' => 0, # why is this required?
32
192
'Data::Stag' => 0.11, # Bio::SeqIO::swiss, we can change to 'recommend' if needed
33
193
'Scalar::Util' => 0, # not in Perl 5.6.1, arrived in core in 5.7.3
34
194
'ExtUtils::Manifest' => '1.52', # allows spaces in file names
36
197
build_requires => {
37
198
'Test::More' => 0,
38
199
'Module::Build' => 0.2805,
39
200
'Test::Harness' => 2.62,
42
recommends => { # does what you would expect of recommends, except more informative output and generates optional_features in META.yml
43
'Ace' => '0/access of ACeDB database/Bio::DB::Ace,Bio::DB::GFF::Adaptor::ace',
44
'Algorithm::Munkres' => '0/Phylogenetic Networks/Bio::PhyloNetwork',
45
'Array::Compare' => '0/Phylogenetic Networks/Bio::PhyloNetwork',
46
# this won't actually install due to circular dep, but we have no way of doing a post-install
47
# the [circular dependency!] specifies it is only installed on explicit request for this specific module,
48
# not when simply choosing to install 'all' modules
49
'Bio::ASN1::EntrezGene' => '0/parsing entrezgene/Bio::SeqIO::entrezgene [circular dependency!]',
50
# we actually need 1.01 of Class::AutoClass, but unfortunately it is versioned as 1.0
51
'Clone' => '0/cloning objects/Bio::Tools::Primer3',
52
'Convert::Binary::C' => '0/strider functionality/Bio::SeqIO::strider',
53
# we specifically want Graph::Directed, but that has no VERSION
54
'Graph' => '0/ontology engine implementation for the GO parser/Bio::PhyloNetwork',
55
'GraphViz' => '0/Phylogenetic Network Visulization/Bio::PhyloNetwork::GraphViz',
56
'HTML::Entities' => '0/remote analysis POST submissions/Bio::SearchIO::blastxml',
57
'HTML::HeadParser' => '3/parsing <HEAD> section of HTML docs/Bio::Tools::Analysis::DNA::ESEfinder',
58
'HTTP::Request::Common' => '0/GenBank+GenPept sequence retrieval, remote http Blast jobs/Bio::DB::*,Bio::Tools::Run::RemoteBlast,Bio::Tools::Analysis::Protein*,Bio::Tools::Analysis::DNA*',
59
'List::MoreUtils' => '0/Back- or reverse-translation of sequences/Bio::Tools::SeqPattern,Bio::Tools::SeqPattern::BackTranslate',
60
'LWP::UserAgent' => '0/remote access/Bio::DB::*,Bio::Tools::Run::RemoteBlast,Bio::WebAgent',
61
'Math::Random' => '0/Random Phylogenetic Networks/Bio::PhyloNetwork::RandomFactory',
62
'PostScript::TextBlock' => '0/EPS output/Bio::Tree::Draw::Cladogram',
63
'Set::Scalar' => '0/proper operation/Bio::Tree::Compatible',
64
'SOAP::Lite' => '0/Bibliographic queries/Bio::DB::Biblio::soap',
65
'Spreadsheet::ParseExcel' => '0/parsing Excel files/Bio::SeqIO::excel,Bio::Microarray::Tools::ReseqChip',
66
'Spreadsheet::WriteExcel' => '0/writing Excel files/Bio::Microarray::Tools::ReseqChip',
67
'Storable' => '2.05/storing sequence objects in local file cache/Bio::DB::FileCache,Bio::SeqFeature::Collection,Bio::PopGen::HtSNP,Bio::PopGen::TagHaplotype,Bio::DB::GFF::Adaptor::berkeleydb',
68
'SVG' => '2.26/creating SVG images/Bio::Draw::Pictogram',
69
'SVG::Graph' => '0.01/creating SVG images/Bio::TreeIO::svggraph',
70
'Text::ParseWords' => '0/test scripts/Bio::DB::SeqFeature::Store::FeatureFileLoader',
71
'URI::Escape' => '0/dealing with web resources/Bio::FeatureIO::gff,Bio::FeatureIO::interpro,Bio::DB::Biblio::eutils,Bio::DB::EUtilParameters,Bio::DB::Query::GenBank,Bio::DB::NCBIHelper,Bio::SeqFeature::Annotated',
72
'XML::DOM::XPath' => '0.13/parsing interpro features/Bio::FeatureIO::interpro',
73
'XML::Parser' => '0/parsing xml/Bio::Biblio::IO::medlinexml',
74
'XML::Parser::PerlSAX' => '0/parsing xml/Bio::SeqIO::tinyseq,Bio::SeqIO::game::gameSubs,Bio::OntologyIO::InterProParser,Bio::ClusterIO::dbsnp',
75
'XML::SAX' => '0.15/parsing xml/Bio::SearchIO::blastxml,Bio::SeqIO::tigrxml,Bio::SeqIO::bsml_sax',
76
'XML::SAX::Writer' => '0/writing xml/Bio::SeqIO::tigrxml',
77
'XML::Simple' => '0/reading custom XML/Bio::Tools::EUtilities,Bio::DB::HIV,Bio::DB::Query::HIVQuery',
78
'XML::Twig' => '0/parsing xml/Bio::Variation::IO::xml,Bio::DB::Taxonomy::entrez,Bio::DB::Biblio::eutils',
79
'XML::Writer' => '0.4/parsing and writing xml/Bio::SeqIO::agave,Bio::SeqIO::game::gameWriter,Bio::SeqIO::chadoxml,Bio::SeqIO::tinyseq,Bio::Variation::IO::xml,Bio::SearchIO::Writer::BSMLResultWriter',
205
# reverted to a simple Module::Build-compatible hash, but we keep
206
# additional data in the %recommends hash above. May be converted to
207
# something simpler if there aren't complaints down the line.
208
map {$_ => $recommends{$_}[0]} sort keys %recommends
83
network => { } # say 'perl Build.PL --network' to manually request network tests
213
network => { } # say 'perl Build.PL --network' to manually request network tests
85
216
auto_features => {
86
BioDBSeqFeature_BDB => {
87
description => "BDB tests for Bio::DB::SeqFeature::Store",
88
feature_requires => { 'DB_File' => 0 } # feature_requires is like requires, except that it doesn't trigger installation
91
description => "BioDBGFF database tests (will need to answer questions before really enabling)",
92
feature_requires => { 'DBI' => 0 },
93
excludes_os => ['mswin'],
94
test => \&test_biodbgff # Bio::Root::Build unique requirement that after everything else succeeds, supplied code ref must also return undef
96
BioDBSeqFeature_mysql => {
97
description => "MySQL tests for Bio::DB::SeqFeature::Store",
98
feature_requires => { 'DBI' => 0, 'DBD::mysql' => 0 },
101
BioDBSeqFeature_Pg => {
102
description => "Postgres tests for Bio::DB::SeqFeature::Store",
103
feature_requires => { 'DBI' => 0, 'DBD::Pg' => 0},
106
BioDBSeqFeature_SQLite => {
107
description => "SQLite tests for Bio::DB::SeqFeature::Store",
108
feature_requires => { 'DBI' => 0, 'DBD::SQLite' => 0},
112
description => "Enable tests that need an internet connection",
113
feature_requires => { 'LWP::UserAgent' => 0 },
114
test => \&Bio::Root::Build::test_internet
218
description => "Presence of Bio::ASN1::EntrezGene",
219
requires => { 'Bio::ASN1::EntrezGene' => 0 } # feature_requires is like requires, except that it doesn't trigger installation
223
description => "BDB tests for Bio::DB::SeqFeature::Store",
224
requires => { 'DB_File' => 0 } # feature_requires is like requires, except that it doesn't trigger installation
227
'Bio::DB::GFF Tests' => {
228
description => "Bio::DB::GFF database tests (will need to answer questions before really enabling)",
229
requires => { 'DBI' => 0 },
233
description => "MySQL-related tests for Bio::DB::SeqFeature::Store",
234
requires => { 'DBI' => 0, 'DBD::mysql' => 0 },
238
description => "PostgreSQL-related tests for Bio::DB::SeqFeature::Store",
239
requires => { 'DBI' => 0, 'DBD::Pg' => 0},
243
description => "SQLite-related tests for Bio::DB::SeqFeature::Store",
244
requires => { 'DBI' => 0, 'DBD::SQLite' => 0},
248
description => "Enable tests that need an internet connection",
249
requires => { 'LWP::UserAgent' => 0 },
117
252
dynamic_config => 1,
118
create_makefile_pl => 'passthrough',
253
#create_makefile_pl => 'passthrough',
119
254
recursive_test_files => 1,
120
256
# Extra files needed for BioPerl modules
121
257
xml_files => {'./Bio/DB/HIV/lanl-schema.xml' => 'lib/Bio/DB/HIV/lanl-schema.xml'},
124
260
#script_files => [] # scripts in scripts directory are installed on-demand
127
my $accept = $build->args->{accept};
129
my $proceed = prompt_for_biodb($accept) if $build->feature('BioDBGFF') || $build->feature('BioDBSeqFeature_mysql');
263
my $accept = $build->args('accept');
265
# how much do I hate this? Let me count the ways.....
266
if (!$build->feature('EntrezGene')) {
268
############################# WARNING #############################
270
Bio::ASN1::EntrezGene not found. This is an *optional* module;
271
however, because it has a circular dependency with BioPerl we do not
272
include it on our list of recommended modules.
274
If you require EntrezGene functionality, you can install
275
Bio::ASN1::EntrezGene after BioPerl has finished installing.
277
############################# WARNING #############################
283
my $proceed = prompt_for_biodb($accept) if $build->feature('Bio::DB::GFF')
284
|| $build->feature('MySQL Tests') || $build->feature('MySQL Tests');
131
286
# Handle auto features
132
if ($proceed && $build->feature('BioDBSeqFeature_BDB')) {
287
if ($proceed && $build->feature('DB_File Tests')) {
133
288
# will return without doing anything if user chose not to run tests during
134
# prompt_for_biodb() above
137
if ($proceed && ($build->feature('BioDBSeqFeature_mysql') or $build->feature('BioDBSeqFeature_Pg'))) {
291
if ($proceed && ($build->feature('MySQL Tests') ||
292
$build->feature('Pg Tests') ||
293
$build->feature('SQLite Tests'))) {
142
298
$build->choose_scripts($accept);
143
#prompt_for_biodbgff($accept) if $build->feature('BioDBGFF');
145
if ($build->args('network')) {
146
if ($build->feature('Network')) {
147
$build->notes(network => 1);
148
$build->log_info(" - will run internet-requiring tests\n");
151
$build->notes(network => 0);
152
$build->log_info(" - will not run network tests since I seem to be missing essential network functionality\n");
300
if ($build->args('network')) {
301
if ($build->feature('Network Tests')) {
302
$build->notes(network => 1);
303
$build->log_info(" - will run internet-requiring tests\n");
156
$build->prompt_for_network($accept) if $build->feature('Network');
306
$build->notes(network => 0);
307
$build->log_info(" - Missing LWP::UserAgent, can't run network tests\n");
158
# then in test script:
159
# use Bio::Root::Build;
160
# my $build = Module::Build->current;
161
# my $do_network_tests = $build->notes('network');
164
# Request that some scripts run post-installation
165
$build->add_post_install_script('maintenance/symlink_script.pl'); # takes a unix file path regardless of local OS
167
# Add extra things to MANIFEST.SKIP
168
$build->add_to_manifest_skip('bioperl.lisp');
311
$build->prompt_for_network($accept) if $build->feature('Network Tests');
170
314
# Add additional files here
171
315
$build->add_build_element('xml');