~ubuntu-branches/ubuntu/trusty/bioperl/trusty-proposed

« back to all changes in this revision

Viewing changes to Build.PL

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2011-06-17 13:51:18 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20110617135118-xgpxhaanue57cwqs
Tags: 1.6.901-1
* New upstream release.
* Point debian/watch to search.cpan.org.
* Build using dh and overrides:
  - Use Debhelper 8 (debian/rules, debian/control).
  - Simplified debian/rules.
* Split into libbio-perl-perl, as discussed with the Debian Perl team.
  (debian/control, debian/bioperl.install, debian libbio-perl-perl.install)
* debian/control:
  - Incremented Standards-Version to reflect conformance with Policy 3.9.2.
    No other changes needed.
  - Vcs-Browser URL made redirectable to viewvc.
  - Removed useless ‘svn’ in the Vcs-Svn URL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/perl -w
 
1
#!/usr/bin/perl
2
2
 
3
3
# This is a Module::Build script for Bioperl installation.
4
4
# See http://search.cpan.org/~kwilliams/Module-Build/lib/Module/Build.pm
13
13
use lib '.';
14
14
use Bio::Root::Build;
15
15
 
16
 
our @drivers;
 
16
# XML::SAX::RTF doesn't work with BioPerl, at all, nada, zilch.
 
17
#
 
18
# Since we're running into this now on CPAN Testers, catch it up front and
 
19
# deal with it.
 
20
#
 
21
# See: https://rt.cpan.org/Ticket/Display.html?id=5943
 
22
#      https://redmine.open-bio.org/issues/2975
 
23
 
 
24
{ eval { require XML::SAX; 1; };
 
25
 
 
26
unless ($@) {
 
27
    if (grep {$_->{Name} =~ 'XML::SAX::RTF'} @{XML::SAX->parsers()}) {
 
28
        warn <<WARN;
 
29
 
 
30
############################# WARNING #############################
 
31
 
 
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.
 
37
 
 
38
############################# WARNING #############################
 
39
 
 
40
WARN
 
41
    sleep 2;
 
42
    }
 
43
}
 
44
 
 
45
}
 
46
 
 
47
my %recommends = (
 
48
    # AcePerl support is deprecated, per LDS - cjfields - 5-5-2011
 
49
    
 
50
    #'Ace'                       => [0,
 
51
    #    'Access of ACeDB database/Bio::DB::Ace,Bio::DB::GFF::Adaptor::ace'],
 
52
    
 
53
    'Algorithm::Munkres'        => [0,
 
54
        'Phylogenetic Networks/Bio::PhyloNetwork'],
 
55
    
 
56
    'Array::Compare'            => [0,
 
57
        'Phylogenetic Networks/Bio::PhyloNetwork'],
 
58
    
 
59
    'YAML'                      => [0,
 
60
        'GenBank->GFF3/bp_genbank2gff3.pl'],
 
61
    
 
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
 
66
    
 
67
    #'Bio::ASN1::EntrezGene'     => [0,
 
68
    #    'Parsing entrezgene/Bio::SeqIO::entrezgene [circular dependency!]'],
 
69
 
 
70
    'Clone'                     => [0,
 
71
        'Cloning objects/Bio::Tools::Primer3'],
 
72
    
 
73
    'Convert::Binary::C'        => [0,
 
74
        'Strider functionality/Bio::SeqIO::strider'],
 
75
        
 
76
    'Error'                     => [0,
 
77
        'OO-based exception handling (very optional)/Bio::Root::Exception'],
 
78
    
 
79
    'GD'                        => [0,
 
80
        'Alignment graphic output/Bio::Align::Graphics'],
 
81
    
 
82
    'Graph'                     => [0,
 
83
        'Phylogenetic Networks, ontology engine implementation, contig analysis'.
 
84
        '/Bio::PhyloNetwork,Bio::Ontology::SimpleGOEngine::GraphAdaptor,'.
 
85
        'Bio::Assembly::Tools::ContigSpectrum'],
 
86
    
 
87
    'GraphViz'                  => [0,
 
88
        'Phylogenetic Network Visulization/Bio::PhyloNetwork::GraphViz'],
 
89
    
 
90
    'HTML::Entities'            => [0,
 
91
        'Remote analysis POST submissions/Bio::SearchIO::blastxml'],
 
92
    
 
93
    'HTML::HeadParser'          => [3,
 
94
        'Parsing <HEAD> section of HTML docs/Bio::Tools::Analysis::DNA::ESEfinder'],
 
95
    
 
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*'],
 
100
    
 
101
    'List::MoreUtils'           => [0,
 
102
        'Back- or reverse-translation of sequences/'.
 
103
        'Bio::Tools::SeqPattern,Bio::Tools::SeqPattern::BackTranslate'],
 
104
    
 
105
    'LWP::UserAgent'            => [0,
 
106
        'Remote access/Bio::DB::*,Bio::Tools::Run::RemoteBlast,Bio::WebAgent'],
 
107
        
 
108
    'Math::Random'              => [0,
 
109
        'Random Phylogenetic Networks/Bio::PhyloNetwork::RandomFactory'],
 
110
    
 
111
    'PostScript::TextBlock'     => [0,
 
112
        'EPS output/Bio::Tree::Draw::Cladogram'],
 
113
    
 
114
    'Set::Scalar'               => [0,
 
115
        'Proper operation/Bio::Tree::Compatible'],
 
116
    
 
117
    'SOAP::Lite'                => [0,
 
118
        'Bibliographic queries/Bio::DB::Biblio::soap'],
 
119
    
 
120
    'Sort::Naturally'           => [0,
 
121
        'Sort lexically, but sort numeral parts numerically/'.
 
122
        'Bio::Assembly::IO::ace,Bio::Assembly::IO::tigr'],
 
123
    
 
124
    'Spreadsheet::ParseExcel'   => [0,
 
125
        'Parsing Excel files/Bio::SeqIO::excel'],
 
126
    
 
127
    'Storable'                  => [2.05,
 
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'],
 
131
    
 
132
    'SVG'                       => [2.26,
 
133
        'Creating SVG images/Bio::Draw::Pictogram'],
 
134
        
 
135
    'SVG::Graph'                => [0.01,
 
136
        'Creating SVG images/Bio::TreeIO::svggraph'],
 
137
    
 
138
    'Text::ParseWords'          => [0,
 
139
        'Test scripts/Bio::DB::SeqFeature::Store::FeatureFileLoader'],
 
140
    
 
141
    'URI::Escape'               => [0,
 
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'],
 
145
    
 
146
    'XML::DOM::XPath'           => [0.13,
 
147
        'parsing interpro features/Bio::FeatureIO::interpro'],
 
148
    
 
149
    'XML::Parser'               => [0,
 
150
        'parsing xml/Bio::Biblio::IO::medlinexml'],
 
151
    
 
152
    'XML::Parser::PerlSAX'      => [0,
 
153
        'Parsing XML/Bio::SeqIO::tinyseq,Bio::SeqIO::game::gameSubs,',
 
154
        'Bio::OntologyIO::InterProParser,Bio::ClusterIO::dbsnp'],
 
155
    
 
156
    'XML::SAX'                  => [0.15,
 
157
        'Parsing XML/Bio::SearchIO::blastxml,Bio::SeqIO::tigrxml,Bio::SeqIO::bsml_sax'],
 
158
    
 
159
    'XML::SAX::Writer'          => [0,
 
160
        'Writing XML/Bio::SeqIO::tigrxml'],
 
161
    
 
162
    'XML::Simple'               => [0,
 
163
        'Reading custom XML/Bio::Tools::EUtilities,Bio::DB::HIV,Bio::DB::Query::HIVQuery'],
 
164
    
 
165
    'XML::Twig'                 => [0,
 
166
        'Parsing XML/Bio::Variation::IO::xml,Bio::DB::Taxonomy::entrez,'.
 
167
        'Bio::DB::Biblio::eutils'],
 
168
    
 
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'],
 
173
);
17
174
 
18
175
my $mysql_ok = 0;
19
176
 
 
177
my @drivers = available_drivers();
 
178
 
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)]},
28
188
    requires            => {
29
189
                            'perl'                      => '5.6.1',
30
 
                            'IO::String'                => 0,
31
 
                            'DB_File'                   => 0,
 
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
35
195
                           },
 
196
    
36
197
    build_requires      => {
37
198
                            'Test::More'                => 0,
38
199
                            'Module::Build'             => 0.2805,
39
200
                            'Test::Harness'             => 2.62,
40
201
                            'CPAN'                      => 1.81
41
202
                           },
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',
 
203
    
 
204
    recommends          => {
 
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
80
209
    },
 
210
    
81
211
    get_options         => {
82
 
                            accept  => { },
83
 
                            network => { } # say 'perl Build.PL --network' to manually request network tests
 
212
        accept  => { },
 
213
        network => { } # say 'perl Build.PL --network' to manually request network tests
84
214
                           },
 
215
    
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
89
 
                                                     },
90
 
                            BioDBGFF              => {
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
95
 
                                                     },
96
 
                            BioDBSeqFeature_mysql => {
97
 
                                                        description      => "MySQL tests for Bio::DB::SeqFeature::Store",
98
 
                                                        feature_requires => { 'DBI' => 0, 'DBD::mysql' => 0 },
99
 
                                                        test             => \&test_db_sf
100
 
                                                     },
101
 
                            BioDBSeqFeature_Pg    => {
102
 
                                                        description      => "Postgres tests for Bio::DB::SeqFeature::Store",
103
 
                                                        feature_requires => { 'DBI' => 0, 'DBD::Pg' => 0},
104
 
                                                        test             => \&test_db_sf
105
 
                                                     },
106
 
                            BioDBSeqFeature_SQLite    => {
107
 
                                                        description      => "SQLite tests for Bio::DB::SeqFeature::Store",
108
 
                                                        feature_requires => { 'DBI' => 0, 'DBD::SQLite' => 0},
109
 
                                                        test             => \&test_db_sf
110
 
                                                     },
111
 
                            Network               => {
112
 
                                                        description      => "Enable tests that need an internet connection",
113
 
                                                        feature_requires => { 'LWP::UserAgent' => 0 },
114
 
                                                        test             => \&Bio::Root::Build::test_internet
115
 
                                                     }
 
217
        'EntrezGene'    => {
 
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
 
220
        },
 
221
        
 
222
        'DB_File Tests' => {
 
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
 
225
         },
 
226
        
 
227
        'Bio::DB::GFF Tests' => {
 
228
            description => "Bio::DB::GFF database tests (will need to answer questions before really enabling)",
 
229
            requires    => { 'DBI' => 0 },
 
230
         },
 
231
        
 
232
        'MySQL Tests'   => {
 
233
            description => "MySQL-related tests for Bio::DB::SeqFeature::Store",
 
234
            requires    => { 'DBI' => 0, 'DBD::mysql' => 0 },
 
235
         },
 
236
        
 
237
        'Pg Tests'      => {
 
238
            description => "PostgreSQL-related tests for Bio::DB::SeqFeature::Store",
 
239
            requires    => { 'DBI' => 0, 'DBD::Pg' => 0},
 
240
         },
 
241
        
 
242
        'SQLite Tests'  => {
 
243
            description => "SQLite-related tests for Bio::DB::SeqFeature::Store",
 
244
            requires    => { 'DBI' => 0, 'DBD::SQLite' => 0},
 
245
         },
 
246
        
 
247
        'Network Tests'              => {
 
248
            description      => "Enable tests that need an internet connection",
 
249
            requires => { 'LWP::UserAgent' => 0 },
 
250
        }
116
251
                           },
117
252
    dynamic_config      => 1,
118
 
    create_makefile_pl  => 'passthrough',
 
253
    #create_makefile_pl  => 'passthrough',
119
254
    recursive_test_files => 1,
 
255
    
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'},
122
258
    
124
260
    #script_files       => [] # scripts in scripts directory are installed on-demand
125
261
);
126
262
 
127
 
my $accept = $build->args->{accept};
128
 
 
129
 
my $proceed = prompt_for_biodb($accept) if $build->feature('BioDBGFF') || $build->feature('BioDBSeqFeature_mysql');
 
263
my $accept = $build->args('accept');
 
264
 
 
265
# how much do I hate this?  Let me count the ways.....
 
266
if (!$build->feature('EntrezGene')) {
 
267
    warn <<WARN;
 
268
############################# WARNING #############################
 
269
 
 
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.
 
273
 
 
274
If you require EntrezGene functionality, you can install
 
275
Bio::ASN1::EntrezGene after BioPerl has finished installing.  
 
276
 
 
277
############################# WARNING #############################
 
278
 
 
279
WARN
 
280
    sleep 3;
 
281
}
 
282
 
 
283
my $proceed = prompt_for_biodb($accept) if $build->feature('Bio::DB::GFF')
 
284
    || $build->feature('MySQL Tests') || $build->feature('MySQL Tests');
130
285
 
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
135
289
    make_bdb_test();
136
290
}
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'))) {
138
294
    make_dbi_test();
139
295
}
140
296
 
141
297
# Ask questions
142
298
$build->choose_scripts($accept);
143
 
#prompt_for_biodbgff($accept) if $build->feature('BioDBGFF');
144
 
{
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");
149
 
        }
150
 
        else {
151
 
            $build->notes(network => 0);
152
 
            $build->log_info("  - will not run network tests since I seem to be missing essential network functionality\n");
153
 
        }
 
299
 
 
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");
154
304
    }
155
305
    else {
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");
157
308
    }
158
 
    # then in test script:
159
 
    #   use Bio::Root::Build;
160
 
    #   my $build = Module::Build->current;
161
 
    #   my $do_network_tests = $build->notes('network');
162
 
}
163
 
 
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
166
 
 
167
 
# Add extra things to MANIFEST.SKIP
168
 
$build->add_to_manifest_skip('bioperl.lisp');
 
309
}
 
310
else {
 
311
    $build->prompt_for_network($accept) if $build->feature('Network Tests');
 
312
}
169
313
 
170
314
# Add additional files here
171
315
$build->add_build_element('xml');
175
319
 
176
320
exit;
177
321
 
 
322
########################## Helper subs ##########################
 
323
 
178
324
sub make_bdb_test {
179
325
    my $path0 = File::Spec->catfile('t', 'LocalDB', 'SeqFeature.t');
180
326
    my $path = File::Spec->catfile('t', 'LocalDB','SeqFeature_BDB.t');
185
331
END
186
332
    close $F;
187
333
    $build->add_to_cleanup($path);
188
 
    $build->add_to_manifest_skip($path);
 
334
    #$build->add_to_manifest_skip($path);
189
335
}
190
336
 
191
 
sub test_db_sf {
192
 
    eval {require DBI;};  # if not installed, this sub won't actually be called
 
337
sub available_drivers {
 
338
    eval {require DBI; 1;};  # if not installed, this sub won't actually be called
 
339
    return if $@;
193
340
    @drivers = DBI->available_drivers;
194
341
    unless (grep {/mysql|Pg|SQLite/i} @drivers) {
195
342
        $mysql_ok = 0;
196
343
        return "Only MySQL, Postgres and SQLite DBI drivers supported for Bio::DB::SeqFeature RDMS tests";
197
344
    }
198
345
    $mysql_ok = 1;
199
 
    return;
 
346
    return @drivers;
200
347
}
201
348
 
202
349
sub make_dbi_test {
211
358
    my $user = $build->notes('test_user');
212
359
    my $pass = $build->notes('test_pass');
213
360
    open my $F,">$path";
214
 
    my $str = "$path0 -adaptor DBI::$driver -create 1 -temp 1 -dsn $dsn";
 
361
    my $str = "$path0 -adaptor DBI::$driver -create 1 -temp 1 -dsn \"$dsn\"";
215
362
    $str .= " -user $user" if $user;
216
363
    $str .= " -password $pass" if $pass;
217
364
    print $F <<END;
220
367
    close $F;
221
368
    $build->add_to_cleanup($path);
222
369
    $build->add_to_cleanup($test_db) if $driver eq 'SQLite';
223
 
    $build->add_to_manifest_skip($path);
 
370
    #$build->add_to_manifest_skip($path);
224
371
}
225
372
 
226
373
sub test_biodbgff {
227
374
    eval {require DBI;};  # if not installed, this sub won't actually be called
 
375
    return if $@;
228
376
    @drivers = DBI->available_drivers;
229
377
    unless (grep {/mysql|Pg|Oracle/i} @drivers) {
230
378
        return "MySQL, Pg nor Oracle DBI drivers are installed";