module-build-checkins Mailing List for Module::Build (Page 19)
Status: Beta
Brought to you by:
kwilliams
You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(82) |
Dec
(58) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(49) |
Feb
(57) |
Mar
(49) |
Apr
(49) |
May
(2) |
Jun
(147) |
Jul
(60) |
Aug
(55) |
Sep
(51) |
Oct
(68) |
Nov
(61) |
Dec
(44) |
| 2006 |
Jan
(27) |
Feb
(38) |
Mar
(89) |
Apr
(31) |
May
(17) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Randy W. S. <si...@us...> - 2005-08-04 06:47:46
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10266/lib/Module/Build Modified Files: Base.pm Log Message: Quit htmlifying early when there is nothing to htmlify. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.471 retrieving revision 1.472 diff -u -d -r1.471 -r1.472 --- Base.pm 4 Aug 2005 03:13:05 -0000 1.471 +++ Base.pm 4 Aug 2005 06:47:34 -0000 1.472 @@ -2041,6 +2041,7 @@ my $pods = $self->_find_pods( $self->{properties}{"${type}doc_dirs"}, exclude => [ qr/\.(?:bat|com|html)$/ ] ); + next unless %$pods; # nothing to do my $podpath = join ':', map $_->[1], |
|
From: Randy W. S. <si...@us...> - 2005-08-04 03:13:45
|
Update of /cvsroot/module-build/Module-Build/lib/Module In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4506/lib/Module Modified Files: Build.pm Log Message: More fixes for splitting html install path up into binhtml & libhtml entries to parallel manpages and to match newer Config.pm entries. Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build.pm,v retrieving revision 1.184 retrieving revision 1.185 diff -u -d -r1.184 -r1.185 --- Build.pm 20 Jun 2005 18:11:09 -0000 1.184 +++ Build.pm 4 Aug 2005 03:13:05 -0000 1.185 @@ -306,10 +306,13 @@ =item docs -This will generate documentation (ie: Unix man pages) for any binary and -library files under B<blib/> that contain POD. If there are no C<bindoc> or -C<libdoc> installation targets defined (as will be the case on systems that -don't support Unix manpages) this action does nothing. +This will generate documentation (ie: Unix man pages and html +documents) for any binary and library files under B<blib/> that +contain POD. If there are no C<bindoc> or C<libdoc> installation +targets defined (as will be the case on systems that don't support +Unix manpages) no action is taken for manpages. If there are no +C<binhtml> or C<libhtml> installation targets defined no action is +taken for html documents. =item fakeinstall @@ -561,17 +564,25 @@ something. Pretty rare to see this in a perl distribution, but it happens. +=item bindoc + +Documentation for the stuff in C<script> and C<bin>. Usually +generated from the POD in those files. Under Unix, these are manual +pages belonging to the 'man1' category. + =item libdoc Documentation for the stuff in C<lib> and C<arch>. This is usually generated from the POD in F<.pm> files. Under Unix, these are manual pages belonging to the 'man3' category. -=item bindoc +=item binhtml -Documentation for the stuff in C<script> and C<bin>. Usually -generated from the POD in those files. Under Unix, these are manual -pages belonging to the 'man1' category. +This is the same as C<bindoc> above, but applies to html documents. + +=item libhtml + +This is the same as C<bindoc> above, but applies to html documents. =back @@ -596,8 +607,13 @@ arch => installarchlib installsitearch installvendorarch script => installscript installsitebin installvendorbin bin => installbin installsitebin installvendorbin - libdoc => installman3dir installsiteman3dir installvendorman3dir bindoc => installman1dir installsiteman1dir installvendorman1dir + libdoc => installman3dir installsiteman3dir installvendorman3dir + binhtml => installhtml1dir installsitehtml1dir installvendorhtml1dir [*] + libhtml => installhtml3dir installsitehtml3dir installvendorhtml3dir [*] + + * Under some OS (eg. MSWin32) the destination for html documents is + determined by the C<Config.pm> entry C<installhtmldir>. The default value of C<installdirs> is "site". If you're creating vendor distributions of module packages, you may want to do something @@ -652,6 +668,8 @@ bin => /home/ken/bin bindoc => /home/ken/man/man1 libdoc => /home/ken/man/man3 + binhtml => /home/ken/html + libhtml => /home/ken/html Note that this is I<different> from how MakeMaker's C<PREFIX> parameter works. Module::Build doesn't support MakeMaker's C<PREFIX> |
|
From: Randy W. S. <si...@us...> - 2005-08-04 03:13:16
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4506/lib/Module/Build Modified Files: Base.pm Log Message: More fixes for splitting html install path up into binhtml & libhtml entries to parallel manpages and to match newer Config.pm entries. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.470 retrieving revision 1.471 diff -u -d -r1.470 -r1.471 --- Base.pm 29 Jul 2005 03:24:41 -0000 1.470 +++ Base.pm 4 Aug 2005 03:13:05 -0000 1.471 @@ -241,8 +241,8 @@ script => ['bin'], bindoc => ['man', 'man1'], libdoc => ['man', 'man3'], - binhtml => ['html', 'script'], - libhtml => ['html', 'lib'], + binhtml => ['html'], + libhtml => ['html'], }; $p->{prefix_relpaths} = @@ -254,8 +254,8 @@ script => ['bin'], bindoc => ['man', 'man1'], libdoc => ['man', 'man3'], - binhtml => ['html', 'script'], - libhtml => ['html', 'lib'], + binhtml => ['html'], + libhtml => ['html'], }, vendor => { lib => [@libstyle], @@ -264,8 +264,8 @@ script => ['bin'], bindoc => ['man', 'man1'], libdoc => ['man', 'man3'], - binhtml => ['html', 'script'], - libhtml => ['html', 'lib'], + binhtml => ['html'], + libhtml => ['html'], }, site => { lib => [@libstyle, 'site_perl'], @@ -274,8 +274,8 @@ script => ['bin'], bindoc => ['man', 'man1'], libdoc => ['man', 'man3'], - binhtml => ['html', 'script'], - libhtml => ['html', 'lib'], + binhtml => ['html'], + libhtml => ['html'], }, }; @@ -560,7 +560,6 @@ __PACKAGE__->add_property(recurse_into => []); __PACKAGE__->add_property(build_class => 'Module::Build'); __PACKAGE__->add_property(html_css => ($^O =~ /Win32/) ? 'Active.css' : ''); -__PACKAGE__->add_property(html_backlink => '__top'); __PACKAGE__->add_property(meta_add => {}); __PACKAGE__->add_property(meta_merge => {}); __PACKAGE__->add_property(metafile => 'META.yml'); @@ -1943,11 +1942,11 @@ if ( Module::Build::ConfigData->feature('manpage_support') && $self->gen_manpages ) { - $self->manify_bin_pods(); - $self->manify_lib_pods(); + $self->manify_bin_pods; + $self->manify_lib_pods; } - $self->htmlify_pods() if $self->gen_html; + $self->htmlify_pods if $self->gen_html; } sub manify_bin_pods { @@ -2025,83 +2024,83 @@ $self->htmlify_pods; } +# XXX This is wrong, wrong, wrong. +# 1) It assumes installation into site directories +# 2) If it's an ActiveState perl install, we need to run +# ActivePerl::DocTools->UpdateTOC; +# 3) Links to other modules are not being generated sub htmlify_pods { my $self = shift; require Module::Build::PodParser; require Pod::Html; - my $pods = $self->_find_pods( [ @{$self->libdoc_dirs}, - @{$self->bindoc_dirs} ], - exclude => [ qr/\.(?:bat|com|html)$/ ] ); - - my $podpath = join ':', - map $_->[1], - grep -e $_->[0], - map [File::Spec->catdir($self->blib, $_), $_], - qw( script lib ); + $self->add_to_cleanup('pod2htm*'); - my $htmldir = File::Spec->catdir($self->blib, 'html'); - unless (-d $htmldir) { - File::Path::mkpath($htmldir, 0, 0755) or die "Couldn't mkdir $htmldir: $!"; - } + foreach my $type ( qw(bin lib) ) { - $self->add_to_cleanup('pod2htm*'); + my $pods = $self->_find_pods( $self->{properties}{"${type}doc_dirs"}, + exclude => [ qr/\.(?:bat|com|html)$/ ] ); - foreach my $pod (keys %$pods){ + my $podpath = join ':', + map $_->[1], + grep -e $_->[0], + map [File::Spec->catdir($self->blib, $_), $_], + qw( script lib ); - my $isbin = 0; - { - my @d = File::Spec->splitdir( - File::Spec->canonpath( (File::Spec->splitpath($pod))[1] ) ); - $isbin = pop( @d ) eq 'script'; + my $htmldir = File::Spec->catdir($self->blib, "${type}html"); + unless ( -d $htmldir ) { + File::Path::mkpath($htmldir, 0, 0755) + or die "Couldn't mkdir $htmldir: $!"; } - my @rootdirs = $isbin ? ('bin') : ('site', 'lib'); + my @rootdirs = ($type eq 'bin') ? qw(bin) : qw(site lib); - my ($name, $path) = File::Basename::fileparse($pods->{$pod}, qr{\..*}); - my @dirs = File::Spec->splitdir( File::Spec->canonpath( $path ) ); - pop( @dirs ) if $dirs[-1] eq File::Spec->curdir; + foreach my $pod ( keys %$pods ) { - my $fulldir = File::Spec->catfile($htmldir, @rootdirs, @dirs); - my $outfile = File::Spec->catfile($fulldir, $name . '.html'); - my $infile = File::Spec->abs2rel($pod); + my ($name, $path) = File::Basename::fileparse($pods->{$pod}, qr{\..*}); + my @dirs = File::Spec->splitdir( File::Spec->canonpath( $path ) ); + pop( @dirs ) if $dirs[-1] eq File::Spec->curdir; - return if $self->up_to_date($infile, $outfile); + my $fulldir = File::Spec->catfile($htmldir, @rootdirs, @dirs); + my $outfile = File::Spec->catfile($fulldir, "${name}.html"); + my $infile = File::Spec->abs2rel($pod); - unless (-d $fulldir){ - File::Path::mkpath($fulldir, 0, 0755) - or die "Couldn't mkdir $fulldir: $!"; - } + return if $self->up_to_date($infile, $outfile); - my $path2root = "../" x (@rootdirs+@dirs); - my $htmlroot = "$path2root/site"; + unless ( -d $fulldir ){ + File::Path::mkpath($fulldir, 0, 0755) + or die "Couldn't mkdir $fulldir: $!"; + } + + my $path2root = join( '/', ('..') x (@rootdirs+@dirs) ); + my $htmlroot = "$path2root/site"; - my $title = join('::', (@dirs, $name)); - { my $fh = IO::File->new($infile); my $abstract = Module::Build::PodParser->new(fh => $fh)->get_abstract(); + + my $title = join( '::', (@dirs, $name) ); $title .= " - $abstract" if $abstract; - } - my @opts = ( - '--flush', - "--title=$title", - "--podpath=$podpath", - "--infile=$infile", - "--outfile=$outfile", - '--podroot=' . $self->blib, - "--htmlroot=$htmlroot", - eval {Pod::Html->VERSION(1.03); 1} ? - ('--header', '--backlink=' . $self->html_backlink) : (), - ); - push( @opts, "--css=$path2root/". $self->html_css ) if $self->html_css; + my @opts = ( + '--flush', + "--title=$title", + "--podpath=$podpath", + "--infile=$infile", + "--outfile=$outfile", + '--podroot=' . $self->blib, + "--htmlroot=$htmlroot", + eval {Pod::Html->VERSION(1.03); 1} ? + ('--header', '--backlink=Back to Top') : (), + ); - $self->log_info("HTMLifying $infile -> $outfile\n"); - $self->log_verbose("pod2html @opts\n"); - Pod::Html::pod2html(@opts); # or warn "pod2html @opts failed: $!"; + push( @opts, "--css=$path2root/". $self->html_css ) if $self->html_css; + $self->log_info("HTMLifying $infile -> $outfile\n"); + $self->log_verbose("pod2html @opts\n"); + Pod::Html::pod2html(@opts); # or warn "pod2html @opts failed: $!"; + } } } @@ -2994,7 +2993,7 @@ } $map{read} = ''; # To keep ExtUtils::Install quiet - + return \%map; } |
|
From: Randy W. S. <si...@us...> - 2005-08-04 03:13:16
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4506/t Modified Files: destinations.t Log Message: More fixes for splitting html install path up into binhtml & libhtml entries to parallel manpages and to match newer Config.pm entries. Index: destinations.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/destinations.t,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- destinations.t 28 Jul 2005 07:29:22 -0000 1.24 +++ destinations.t 4 Aug 2005 03:13:06 -0000 1.25 @@ -104,8 +104,8 @@ script => catdir( $install_base, 'bin' ), bindoc => catdir( $install_base, 'man', 'man1'), libdoc => catdir( $install_base, 'man', 'man3' ), - binhtml => catdir( $install_base, 'html', 'script'), - libhtml => catdir( $install_base, 'html', 'lib' ), + binhtml => catdir( $install_base, 'html' ), + libhtml => catdir( $install_base, 'html' ), }); } @@ -183,8 +183,8 @@ script => catdir( $install_base, 'bin' ), bindoc => catdir( $install_base, 'man', 'man1'), libdoc => catdir( $install_base, 'man', 'man3' ), - binhtml => catdir( $install_base, 'html', 'script'), - libhtml => catdir( $install_base, 'html', 'lib' ), + binhtml => catdir( $install_base, 'html' ), + libhtml => catdir( $install_base, 'html' ), }); } |
|
From: Ken W. <kwi...@us...> - 2005-08-04 03:12:18
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4132/lib/CPANPLUS/Dist Modified Files: Build.pm Log Message: Start working on proper prereq checking Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Build.pm 4 Aug 2005 01:47:49 -0000 1.2 +++ Build.pm 4 Aug 2005 03:11:22 -0000 1.3 @@ -260,26 +260,15 @@ #local $ENV{PERL5LIB} = CPANPLUS::inc->original_perl5lib; local @INC = CPANPLUS::inc->original_inc; - ### but do it *before* the new_from_context, as M::B seems - ### to be actually running the file... - ### an unshift in the block seems to be ignored.. somehow... - #{ my $lib = $self->best_path_to_module_build; - # unshift @INC, $lib if $lib; - #} - - ### we're a seperate release now, so - #unshift @INC, $self->best_path_to_module_build - # if $self->best_path_to_module_build; - ### this will generate warnings under anything lower than M::B 0.2606 my %buildflags = $dist->_buildflags_as_hash( $buildflags ); $dist->status->_buildflags( $buildflags ); my $fail; RUN: { - ### piece of sh*t, stop DYING! --kane + # Wrap the exception that may be thrown here (should likely be + # done at a much higher level). my $mb = eval { Module::Build->new_from_context( %buildflags ) }; - #my $mb = eval { Module::Build->new_from_context( ) }; if( !$mb or $@ ) { error(loc("Could not create Module::Build object: %1","$@")); $fail++; last RUN; @@ -289,52 +278,34 @@ ### resolve prereqs ### my $prereqs = $dist->_find_prereqs( verbose => $verbose ); + my %prereqs_out; - ### XXX mangle prereqs because our uptodate() function can't - ### handle M::B version ranges -- perhaps always use M::B to - ### verify if modules are up to date, but that would cause a - ### dependency - ### so for now, always use the most recent version of a module - ### if the prereq was somehow unsatisfied - my $mangled_prereqs = {}; for my $mod (keys %$prereqs) { - my $modobj = $cb->module_tree($mod); - unless( $modobj ) { - ### XXX just skip it for now.. not sure if it's the best - ### thing to do -- but some times a module (like Config) - ### is not in the index, but it's part of core... - #error(loc("Unable to find '%1' in the module tree ". - # "-- unable to satisfy prerequisites", $mod)); - #$fail++; last RUN; - next; - } - - ### ok, so there's several ways this can go.. either you don't - ### care about the version, then the $mb_version will be 'false' - ### otherwise you want 'a' version -- means $mb_version may only - ### contain \d. otherwise we don't know what the hell you - ### want, and just assume any old version is good enough - ### XXX of course, this is not necessarily correct *AT ALL* - my $mb_version = $prereqs->{$mod}; - my $wanted; - - ### anything will do - unless( $mb_version ) { - $wanted = 0; - - ### a specific version - } elsif ( $mb_version =~ /^[\d.]+$/ ) { - $wanted = $mb_version; + # Check whether the installed version (if any) satisfies this + # prereq. If not, check whether the latest CPAN version + # satisfies it. If not, fail. - ### eh, some sort of range...?? - } else { - $wanted = 0; - } + warn "Checking prereq $mod ($prereqs->{$mod})"; - $mangled_prereqs->{ $mod } = $wanted; + my $status = Module::Build->check_installed_status($mod, $prereqs->{$mod}); + next if $status->{ok}; + + # XXX get the latest version from the CPAN index and check it + no strict 'refs'; + local ${$mod . '::VERSION'} = get_indexed_version($mod); # XXX this function doesn't exist + my $status = Module::Build->check_installed_status($mod, $prereqs->{$mod}); + if ($status->{ok}) { + $prereqs_out{$mod} = $status->{have}; + next; + } + + error(loc("This distribution depends on $mod, but the latest version of $mod on CPAN ". + "doesn't satisfy the specific version dependency ($prereqs->{$mod}). ". + "Please try to resolve this dependency manually.")); + $fail++; } - $self->status->prereqs( $mangled_prereqs ); + $self->status->prereqs( \%prereqs_out ); } ### send out test report? ### |
|
From: Ken W. <kwi...@us...> - 2005-08-04 01:47:58
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20618/lib/CPANPLUS/Dist Modified Files: Build.pm Log Message: Update two 'KNOWN ISSUES' in the docs and add me to the author text Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Build.pm 4 Aug 2005 01:36:03 -0000 1.1 +++ Build.pm 4 Aug 2005 01:47:49 -0000 1.2 @@ -765,21 +765,6 @@ As a work around, we now simply assume that the most recent version on CPAN satisfies a dependency. -=item * Module::Build doesn't support 'PREFIX' (#8759) - -Module::Build doens't support the standard C<Makefile.PL> argument -C<PREFIX> and dies if it is provided. Even though that's not usually a -problem, sometimes M::B enabled distros ship a C<Makefile.PL> that -calls the C<Build.PL> under the hood. In these cases, a C<PREFIX> might -be provided and C<Module::Build> will die. - -=item * Module::Build masquerades as Makefile.PL but is not compatible (#13145) - -Related to the previous entry, C<Module::Build> can create a -C<Makefile.PL> which under the hood invokes C<Module::Build>. It however -does not support all the options that C<ExtUtils::MakeMaker> does, and -will die if you try to invoke the file with one of those options. - =item * Module::Build can not be upgraded using it's own API (#13169) This is due to the fact that the Build file insists on adding a path @@ -798,8 +783,8 @@ =head1 AUTHOR -This module by -Jos Boumans E<lt>ka...@cp...<gt>. +Originally by Jos Boumans E<lt>ka...@cp...<gt>. Brought to working +condition and currently maintained by Ken Williams E<lt>kwi...@cp...<gt>. =head1 COPYRIGHT |
|
From: Ken W. <kwi...@us...> - 2005-08-04 01:45:25
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20190/t Modified Files: 02_CPANPLUS-Dist-Build.t Log Message: Uninstalling should work (but doesn't) Index: 02_CPANPLUS-Dist-Build.t =================================================================== RCS file: /cvsroot/module-build/CPANPLUS-Dist-Build/t/02_CPANPLUS-Dist-Build.t,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- 02_CPANPLUS-Dist-Build.t 4 Aug 2005 01:36:03 -0000 1.1 +++ 02_CPANPLUS-Dist-Build.t 4 Aug 2005 01:45:16 -0000 1.2 @@ -134,14 +134,13 @@ "Installing module" ); ok( $mod->status->installed, " Status says module installed" ); - } SKIP: { - skip(q[Can't uninstall: Module::Build writes no .packlist], 1); - - ### XXX M::B doesn't seem to write into the .packlist... - ### can't figure out what to uninstall then... + my $minversion = 0.2609; + skip(qq[Uninstalling requires at least Module::Build $minversion], 1) + unless eval { Module::Build->VERSION($minversion); 1 }; + ok( $mod->uninstall,"Uninstalling module" ); } } |
|
From: Ken W. <kwi...@us...> - 2005-08-04 01:36:17
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18284/t Added Files: 01_CPANPLUS-Dist-Build-Constants.t 02_CPANPLUS-Dist-Build.t Log Message: Initial checkin of Jos' code --- NEW FILE: 01_CPANPLUS-Dist-Build-Constants.t --- BEGIN { chdir 't' if -d 't' }; ### this is to make devel::cover happy ### BEGIN { use File::Spec; require lib; for (qw[../lib inc]) { my $l = 'lib'; $l->import(File::Spec->rel2abs($_)) } } use strict; use Test::More 'no_plan'; my $Class = 'CPANPLUS::Dist::Build::Constants'; use_ok( $Class ); for my $name ( qw[BUILD BUILD_DIR] ) { my $sub = $Class->can( $name ); ok( $sub, "$Class can $name" ); ok( $sub->(), " $name called OK" ); } --- NEW FILE: 02_CPANPLUS-Dist-Build.t --- BEGIN { chdir 't' if -d 't' }; ### this is to make devel::cover happy ### BEGIN { use File::Spec; require lib; for (qw[../lib inc]) { my $l = 'lib'; $l->import(File::Spec->rel2abs($_)) } } use strict; use CPANPLUS::Configure; use CPANPLUS::Backend; use CPANPLUS::Internals::Constants; use CPANPLUS::Module::Fake; use CPANPLUS::Module::Author::Fake; use Config; use Test::More 'no_plan'; use File::Basename (); use Data::Dumper; use Config; use IPC::Cmd 'can_run'; my $Class = 'CPANPLUS::Dist::Build'; my $Utils = 'CPANPLUS::Internals::Utils'; my $Have_CC = can_run($Config{'cc'} )? 1 : 0; my $Lib = File::Spec->rel2abs(File::Spec->catdir( qw[dummy-perl] )); my $Src = File::Spec->rel2abs(File::Spec->catdir( qw[src] )); my $Verbose = @ARGV ? 1 : 0; my $Conf = CPANPLUS::Configure->new( conf => { base => 'dummy-cpanplus', dist_type => '', verbose => $Verbose, ### running tests will mess with the test output ### counter so skip 'm skiptest => 1, } ); my $CB = CPANPLUS::Backend->new( $Conf ); # path, cc needed? my %Map = ( noxs => 0, xs => 1 ); ### Disable certain possible settings, so we dont accidentally ### touch anything outside our sandbox { ### set buildflags to install in our dummy perl dir $Conf->set_conf( buildflags => "install_base=$Lib" ); ### don't start sending test reports now... ### $CB->_callbacks->send_test_report( sub { 0 } ); $Conf->set_conf( cpantest => 0 ); ### we dont need sudo -- we're installing in our own sandbox now $Conf->set_program( sudo => undef ); } use_ok( $Class ); ok( $Class->format_available, "Format is available" ); while( my($path,$need_cc) = each %Map ) { ### create a fake object, so we don't use the actual module tree my $mod = CPANPLUS::Module::Fake->new( module => 'Foo::Bar', path => 'src', author => CPANPLUS::Module::Author::Fake->new, package => 'Foo-Bar-0.01.tar.gz', ); ok( $mod, "Module object created for '$path'" ); ### set the fetch location -- it's local { my $where = File::Spec->rel2abs( File::Spec->catdir( $Src, $path, $mod->package ) ); $mod->status->fetch( $where ); ok( -e $where, " Tarball '$where' exists" ); } ok( $mod->prepare, " Preparing module" ); ok( $mod->status->dist_cpan, " Dist registered as status" ); isa_ok( $mod->status->dist_cpan, $Class ); ok( $mod->status->dist_cpan->status->prepared, " Prepared status registered" ); is( $mod->status->dist_cpan->status->distdir, $mod->status->extract, " Distdir status registered properly" ); is( $mod->status->installer_type, INSTALLER_BUILD, " Proper installer type found" ); ### we might not have a C compiler SKIP: { skip("The CC compiler listed in Config.pm is not available " . "-- skipping compile tests", 5) if $need_cc && !$Have_CC; ok( $mod->create( ), "Creating module" ); ok( $mod->status->dist_cpan->status->created, " Created status registered" ); ### install tests SKIP: { skip("Install tests require Module::Build 0.2606 or higher", 2) unless $Module::Build::VERSION >= '0.2606'; ### flush the lib cache ### otherwise, cpanplus thinks the module's already installed ### since the blib is already in @INC $CB->_flush( list => [qw|lib|] ); ### force the install, make sure the Dist::Build->install() ### sub gets called ok( $mod->install( force => 1 ), "Installing module" ); ok( $mod->status->installed, " Status says module installed" ); } SKIP: { skip(q[Can't uninstall: Module::Build writes no .packlist], 1); ### XXX M::B doesn't seem to write into the .packlist... ### can't figure out what to uninstall then... ok( $mod->uninstall,"Uninstalling module" ); } } ### throw away all the extracted stuff $Utils->_rmdir( dir => $Conf->get_conf('base') ); } # Local variables: # c-indentation-style: bsd # c-basic-offset: 4 # indent-tabs-mode: nil # End: # vim: expandtab shiftwidth=4: |
|
From: Ken W. <kwi...@us...> - 2005-08-04 01:36:17
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/t/dummy-perl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18284/t/dummy-perl Added Files: .hidden Log Message: Initial checkin of Jos' code --- NEW FILE: .hidden --- |
|
From: Ken W. <kwi...@us...> - 2005-08-04 01:36:17
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/t/dummy-perl/man/man1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18284/t/dummy-perl/man/man1 Added Files: .hidden Log Message: Initial checkin of Jos' code --- NEW FILE: .hidden --- |
|
From: Ken W. <kwi...@us...> - 2005-08-04 01:36:17
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/t/src/xs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18284/t/src/xs Added Files: Foo-Bar-0.01.tar.gz Log Message: Initial checkin of Jos' code --- NEW FILE: Foo-Bar-0.01.tar.gz --- (This appears to be a binary file; contents omitted.) |
|
From: Ken W. <kwi...@us...> - 2005-08-04 01:36:17
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/t/dummy-perl/man/man3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18284/t/dummy-perl/man/man3 Added Files: .hidden Log Message: Initial checkin of Jos' code --- NEW FILE: .hidden --- |
|
From: Ken W. <kwi...@us...> - 2005-08-04 01:36:17
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/t/dummy-perl/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18284/t/dummy-perl/lib Added Files: .hidden Log Message: Initial checkin of Jos' code --- NEW FILE: .hidden --- |
|
From: Ken W. <kwi...@us...> - 2005-08-04 01:36:16
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/t/src/noxs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18284/t/src/noxs Added Files: Foo-Bar-0.01.tar.gz Log Message: Initial checkin of Jos' code --- NEW FILE: Foo-Bar-0.01.tar.gz --- (This appears to be a binary file; contents omitted.) |
|
From: Ken W. <kwi...@us...> - 2005-08-04 01:36:13
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18284/lib/CPANPLUS/Dist Added Files: Build.pm Log Message: Initial checkin of Jos' code --- NEW FILE: Build.pm --- package CPANPLUS::Dist::Build; use strict; use vars qw[@ISA $STATUS $VERSION]; @ISA = qw[CPANPLUS::Dist]; use CPANPLUS::inc; use CPANPLUS::Internals::Constants; ### these constants were exported by CPANPLUS::Internals::Constants ### in previous versions.. they do the same though. If we want to have ### a normal 'use' here, up the dependency to CPANPLUS 0.056 or higher BEGIN { require CPANPLUS::Dist::Build::Constants; CPANPLUS::Dist::Build::Constants->import() if not __PACKAGE__->can('BUILD') && __PACKAGE__->can('BUILD_DIR'); } use CPANPLUS::Error; use Config; use FileHandle; use Cwd; use IPC::Cmd qw[run]; use Params::Check qw[check]; use Module::Load::Conditional qw[can_load check_install]; use Locale::Maketext::Simple Class => 'CPANPLUS', Style => 'gettext'; local $Params::Check::VERBOSE = 1; $VERSION = '0.02'; =pod =head1 NAME CPANPLUS::Dist::Build =head1 SYNOPSIS my $build = CPANPLUS::Dist->new( format => 'CPANPLUS::Dist::Build', module => $modobj, ); $build->prepare; # runs Module::Build->new_from_context; $build->create; # runs build && build test $build->install; # runs build install =head1 DESCRIPTION C<CPANPLUS::Dist::Build> is a distribution class for C<Module::Build> related modules. Using this package, you can create, install and uninstall perl modules. It inherits from C<CPANPLUS::Dist>. Normal users won't have to worry about the interface to this module, as it functions transparently as a plug-in to C<CPANPLUS> and will just C<Do The Right Thing> when it's loaded. =head1 ACCESSORS =over 4 =item parent() Returns the C<CPANPLUS::Module> object that parented this object. =item status() Returns the C<Object::Accessor> object that keeps the status for this module. =back =head1 STATUS ACCESSORS All accessors can be accessed as follows: $build->status->ACCESSOR =over 4 =item build_pl () Location of the Build file. Set to 0 explicitly if something went wrong. =item build () BOOL indicating if the C<Build> command was successful. =item test () BOOL indicating if the C<Build test> command was successful. =item prepared () BOOL indicating if the C<prepare> call exited succesfully This gets set after C<perl Build.PL> =item distdir () Full path to the directory in which the C<prepare> call took place, set after a call to C<prepare>. =item created () BOOL indicating if the C<create> call exited succesfully. This gets set after C<Build> and C<Build test>. =item installed () BOOL indicating if the module was installed. This gets set after C<Build install> exits successfully. =item uninstalled () BOOL indicating if the module was uninstalled properly. =item _create_args () Storage of the arguments passed to C<create> for this object. Used for recursive calls when satisfying prerequisites. =item _install_args () Storage of the arguments passed to C<install> for this object. Used for recursive calls when satisfying prerequisites. =item _mb_object () Storage of the C<Module::Build> object we used for this installation. =back =cut =head1 METHODS =head2 $bool = CPANPLUS::Dist::Build->format_available(); Returns a boolean indicating whether or not you can use this package to create and install modules in your environment. =cut ### check if the format is available ### sub format_available { my $mod = "Module::Build"; unless( can_load( modules => { $mod => '0.2611' } ) ) { error( loc( "You do not have '%1' -- '%2' not available", $mod, __PACKAGE__ ) ); return; } return 1; } =head2 $bool = $dist->init(); Sets up the C<CPANPLUS::Dist::Build> object for use. Effectively creates all the needed status accessors. Called automatically whenever you create a new C<CPANPLUS::Dist> object. =cut sub init { my $dist = shift; my $status = $dist->status; $status->mk_accessors(qw[build_pl build test created installed uninstalled _create_args _install_args _prepare_args _mb_object _buildflags ]); ### just in case 'format_available' didn't get called require Module::Build; return 1; } =pod =head2 $bool = $dist->prepare([perl => '/path/to/perl', buildflags => 'EXTRA=FLAGS', force => BOOL, verbose => BOOL]) C<prepare> prepares a distribution, running C<Module::Build>'s C<new_from_context> method, and establishing any prerequisites this distribution has. After a succcesfull C<prepare> you may call C<create> to create the distribution, followed by C<install> to actually install it. Returns true on success and false on failure. =cut sub prepare { ### just in case you already did a create call for this module object ### just via a different dist object my $dist = shift; my $self = $dist->parent; ### we're also the cpan_dist, since we don't need to have anything ### prepared from another installer $dist = $self->status->dist_cpan if $self->status->dist_cpan; $self->status->dist_cpan( $dist ) unless $self->status->dist_cpan; my $cb = $self->parent; my $conf = $cb->configure_object; my %hash = @_; my $dir; unless( $dir = $self->status->extract ) { error( loc( "No dir found to operate on!" ) ); return; } my $args; my( $force, $verbose, $buildflags, $perl); { local $Params::Check::ALLOW_UNKNOWN = 1; my $tmpl = { force => { default => $conf->get_conf('force'), store => \$force }, verbose => { default => $conf->get_conf('verbose'), store => \$verbose }, perl => { default => $^X, store => \$perl }, buildflags => { default => $conf->get_conf('buildflags'), store => \$buildflags }, }; $args = check( $tmpl, \%hash ) or return; } return 1 if $dist->status->prepared && !$force; $dist->status->_prepare_args( $args ); ### chdir to work directory ### my $orig = cwd(); unless( $cb->_chdir( dir => $dir ) ) { error( loc( "Could not chdir to build directory '%1'", $dir ) ); return; } ### by now we've loaded module::build, and we're using the API, so ### it's safe to remove CPANPLUS::inc from our inc path, especially ### because it can trip up tests run under taint (just like EU::MM). ### turn off our PERL5OPT so no modules from CPANPLUS::inc get ### included in make test -- it should build without. ### also, modules that run in taint mode break if we leave ### our code ref in perl5opt ### XXX we've removed the ENV settings from cp::inc, so only need ### to reset the @INC #local $ENV{PERL5OPT} = CPANPLUS::inc->original_perl5opt; #local $ENV{PERL5LIB} = CPANPLUS::inc->original_perl5lib; local @INC = CPANPLUS::inc->original_inc; ### but do it *before* the new_from_context, as M::B seems ### to be actually running the file... ### an unshift in the block seems to be ignored.. somehow... #{ my $lib = $self->best_path_to_module_build; # unshift @INC, $lib if $lib; #} ### we're a seperate release now, so #unshift @INC, $self->best_path_to_module_build # if $self->best_path_to_module_build; ### this will generate warnings under anything lower than M::B 0.2606 my %buildflags = $dist->_buildflags_as_hash( $buildflags ); $dist->status->_buildflags( $buildflags ); my $fail; RUN: { ### piece of sh*t, stop DYING! --kane my $mb = eval { Module::Build->new_from_context( %buildflags ) }; #my $mb = eval { Module::Build->new_from_context( ) }; if( !$mb or $@ ) { error(loc("Could not create Module::Build object: %1","$@")); $fail++; last RUN; } $dist->status->_mb_object( $mb ); ### resolve prereqs ### my $prereqs = $dist->_find_prereqs( verbose => $verbose ); ### XXX mangle prereqs because our uptodate() function can't ### handle M::B version ranges -- perhaps always use M::B to ### verify if modules are up to date, but that would cause a ### dependency ### so for now, always use the most recent version of a module ### if the prereq was somehow unsatisfied my $mangled_prereqs = {}; for my $mod (keys %$prereqs) { my $modobj = $cb->module_tree($mod); unless( $modobj ) { ### XXX just skip it for now.. not sure if it's the best ### thing to do -- but some times a module (like Config) ### is not in the index, but it's part of core... #error(loc("Unable to find '%1' in the module tree ". # "-- unable to satisfy prerequisites", $mod)); #$fail++; last RUN; next; } ### ok, so there's several ways this can go.. either you don't ### care about the version, then the $mb_version will be 'false' ### otherwise you want 'a' version -- means $mb_version may only ### contain \d. otherwise we don't know what the hell you ### want, and just assume any old version is good enough ### XXX of course, this is not necessarily correct *AT ALL* my $mb_version = $prereqs->{$mod}; my $wanted; ### anything will do unless( $mb_version ) { $wanted = 0; ### a specific version } elsif ( $mb_version =~ /^[\d.]+$/ ) { $wanted = $mb_version; ### eh, some sort of range...?? } else { $wanted = 0; } $mangled_prereqs->{ $mod } = $wanted; } $self->status->prereqs( $mangled_prereqs ); } ### send out test report? ### if( $fail and $conf->get_conf('cpantest') ) { $cb->_send_report( module => $self, failed => $fail, buffer => CPANPLUS::Error->stack_as_string, verbose => $verbose, force => $force, ) or error(loc("Failed to send test report for '%1'", $self->module ) ); } unless( $cb->_chdir( dir => $orig ) ) { error( loc( "Could not chdir back to start dir '%1'", $orig ) ); } ### save where we wrote this stuff -- same as extract dir in normal ### installer circumstances $dist->status->distdir( $self->status->extract ); return $dist->status->prepared( $fail ? 0 : 1 ); } sub _find_prereqs { my $dist = shift; my $mb = $dist->status->_mb_object; my $self = $dist->parent; ### Lame++, at least return an empty hashref... my $prereqs = $mb->requires || {}; $self->status->prereqs( $prereqs ); return $prereqs; } =pod =head2 $dist->create([perl => '/path/to/perl', buildflags => 'EXTRA=FLAGS', prereq_target => TARGET, force => BOOL, verbose => BOOL, skiptest => BOOL]) C<create> preps a distribution for installation. This means it will run C<Build> and C<Build test>, via the C<Module::Build> API. This will also satisfy any prerequisites the module may have. If you set C<skiptest> to true, it will skip the C<Build test> stage. If you set C<force> to true, it will go over all the stages of the C<Build> process again, ignoring any previously cached results. It will also ignore a bad return value from C<Build test> and still allow the operation to return true. Returns true on success and false on failure. You may then call C<< $dist->install >> on the object to actually install it. =cut sub create { ### just in case you already did a create call for this module object ### just via a different dist object my $dist = shift; my $self = $dist->parent; ### we're also the cpan_dist, since we don't need to have anything ### prepared from another installer $dist = $self->status->dist_cpan if $self->status->dist_cpan; $self->status->dist_cpan( $dist ) unless $self->status->dist_cpan; my $cb = $self->parent; my $conf = $cb->configure_object; my $mb = $dist->status->_mb_object; my %hash = @_; my $dir; unless( $dir = $self->status->extract ) { error( loc( "No dir found to operate on!" ) ); return; } my $args; my( $force, $verbose, $buildflags, $skiptest, $prereq_target, $perl, $prereq_format, $prereq_build); { local $Params::Check::ALLOW_UNKNOWN = 1; my $tmpl = { force => { default => $conf->get_conf('force'), store => \$force }, verbose => { default => $conf->get_conf('verbose'), store => \$verbose }, perl => { default => $^X, store => \$perl }, buildflags => { default => $conf->get_conf('buildflags'), store => \$buildflags }, skiptest => { default => $conf->get_conf('skiptest'), store => \$skiptest }, prereq_target => { default => '', store => \$prereq_target }, ### don't set the default format to 'build' -- that is wrong! prereq_format => { #default => $self->status->installer_type, default => '', store => \$prereq_format }, prereq_build => { default => 0, store => \$prereq_build }, }; $args = check( $tmpl, \%hash ) or return; } return 1 if $dist->status->created && !$force; $dist->status->_create_args( $args ); ### is this dist prepared? unless( $dist->status->prepared ) { error( loc( "You have not successfully prepared a '%2' distribution ". "yet -- cannot create yet", __PACKAGE__ ) ); return; } ### chdir to work directory ### my $orig = cwd(); unless( $cb->_chdir( dir => $dir ) ) { error( loc( "Could not chdir to build directory '%1'", $dir ) ); return; } ### by now we've loaded module::build, and we're using the API, so ### it's safe to remove CPANPLUS::inc from our inc path, especially ### because it can trip up tests run under taint (just like EU::MM). ### turn off our PERL5OPT so no modules from CPANPLUS::inc get ### included in make test -- it should build without. ### also, modules that run in taint mode break if we leave ### our code ref in perl5opt ### XXX we've removed the ENV settings from cp::inc, so only need ### to reset the @INC #local $ENV{PERL5OPT} = CPANPLUS::inc->original_perl5opt; #local $ENV{PERL5LIB} = CPANPLUS::inc->original_perl5lib; local @INC = CPANPLUS::inc->original_inc; ### but do it *before* the new_from_context, as M::B seems ### to be actually running the file... ### an unshift in the block seems to be ignored.. somehow... #{ my $lib = $self->best_path_to_module_build; # unshift @INC, $lib if $lib; #} unshift @INC, $self->best_path_to_module_build if $self->best_path_to_module_build; ### this will generate warnings under anything lower than M::B 0.2606 my %buildflags = $dist->_buildflags_as_hash( $buildflags ); $dist->status->_buildflags( $buildflags ); my $fail; my $prereq_fail; RUN: { ### this will set the directory back to the start ### dir, so we must chdir /again/ my $ok = $dist->_resolve_prereqs( force => $force, format => $prereq_format, verbose => $verbose, prereqs => $self->status->prereqs, target => $prereq_target, prereq_build => $prereq_build, ); unless( $cb->_chdir( dir => $dir ) ) { error( loc( "Could not chdir to build directory '%1'", $dir ) ); return; } unless( $ok ) { #### use $dist->flush to reset the cache ### error( loc( "Unable to satisfy prerequisites for '%1' " . "-- aborting install", $self->module ) ); $dist->status->build(0); $fail++; $prereq_fail++; last RUN; } eval { $mb->dispatch('build', %buildflags) }; if( $@ ) { error(loc("Could not run '%1': %2", 'Build', "$@")); $dist->status->build(0); $fail++; last RUN; } $dist->status->build(1); ### add this directory to your lib ### $cb->_add_to_includepath( directories => [ BLIB_LIBDIR->( $self->status->extract ) ] ); ### this buffer will not include what tests failed due to a ### M::B/Test::Harness bug. Reported as #9793 with patch ### against 0.2607 on 26/1/2005 unless( $skiptest ) { eval { $mb->dispatch('test', %buildflags) }; if( $@ ) { error(loc("Could not run '%1': %2", 'Build test', "$@")); unless($force) { $dist->status->test(0); $fail++; last RUN; } } else { $dist->status->test(1); } } else { msg(loc("Tests skipped"), $verbose); } } unless( $cb->_chdir( dir => $orig ) ) { error( loc( "Could not chdir back to start dir '%1'", $orig ) ); } ### send out test report? ### if( $conf->get_conf('cpantest') and not $prereq_fail ) { $cb->_send_report( module => $self, failed => $fail, buffer => CPANPLUS::Error->stack_as_string, verbose => $verbose, force => $force, tests_skipped => $skiptest, ) or error(loc("Failed to send test report for '%1'", $self->module ) ); } return $dist->status->created( $fail ? 0 : 1 ); } =head2 $dist->install([verbose => BOOL, perl => /path/to/perl]) Actually installs the created dist. Returns true on success and false on failure. =cut sub install { ### just in case you already did a create call for this module object ### just via a different dist object my $dist = shift; my $self = $dist->parent; ### we're also the cpan_dist, since we don't need to have anything ### prepared from another installer $dist = $self->status->dist_cpan if $self->status->dist_cpan; my $mb = $dist->status->_mb_object; my $cb = $self->parent; my $conf = $cb->configure_object; my %hash = @_; my $verbose; my $perl; my $force; { local $Params::Check::ALLOW_UNKNOWN = 1; my $tmpl = { verbose => { default => $conf->get_conf('verbose'), store => \$verbose }, force => { default => $conf->get_conf('force'), store => \$force }, perl => { default => $conf->get_program('perl') || $^X, store => \$perl }, }; my $args = check( $tmpl, \%hash ) or return; $dist->status->_install_args( $args ); } my $dir; unless( $dir = $self->status->extract ) { error( loc( "No dir found to operate on!" ) ); return; } my $orig = cwd(); unless( $cb->_chdir( dir => $dir ) ) { error( loc( "Could not chdir to build directory '%1'", $dir ) ); return; } ### value set and false -- means failure ### if( defined $self->status->installed && !$self->status->installed && !$force ) { error( loc( "Module '%1' has failed to install before this session " . "-- aborting install", $self->module ) ); return; } my $fail; my $buildflags = $dist->status->_buildflags; ### hmm, how is this going to deal with sudo? ### for now, check effective uid, if it's not root, ### shell out, otherwise use the method if( $> ) { ### don't worry about loading the right version of M::B anymore ### the 'new_from_context' already added the 'right' path to ### M::B at the top of the build.pl my $cmd = [$perl, BUILD->($dir), 'install', $buildflags]; my $sudo = $conf->get_program('sudo'); unshift @$cmd, $sudo if $sudo; my $buffer; unless( scalar run( command => $cmd, buffer => \$buffer, verbose => $verbose ) ) { error(loc("Could not run '%1': %2", 'Build install', $buffer)); $fail++; } } else { my %buildflags = $dist->_buildflags_as_hash($buildflags); eval { $mb->dispatch('install', %buildflags) }; if( $@ ) { error(loc("Could not run '%1': %2", 'Build install', "$@")); $fail++; } } unless( $cb->_chdir( dir => $orig ) ) { error( loc( "Could not chdir back to start dir '%1'", $orig ) ); } return $dist->status->installed( $fail ? 0 : 1 ); } ### returns the string 'foo=bar zot=quux' as (foo => bar, zot => quux) sub _buildflags_as_hash { my $self = shift; my $flags = shift or return; my @argv = Module::Build->split_like_shell($flags); my ($argv) = Module::Build->read_args(@argv); return %$argv; } sub dist_dir { ### just in case you already did a create call for this module object ### just via a different dist object my $dist = shift; my $self = $dist->parent; ### we're also the cpan_dist, since we don't need to have anything ### prepared from another installer $dist = $self->status->dist_cpan if $self->status->dist_cpan; my $mb = $dist->status->_mb_object; my $cb = $self->parent; my $conf = $cb->configure_object; my %hash = @_; my $dir; unless( $dir = $self->status->extract ) { error( loc( "No dir found to operate on!" ) ); return; } ### chdir to work directory ### my $orig = cwd(); unless( $cb->_chdir( dir => $dir ) ) { error( loc( "Could not chdir to build directory '%1'", $dir ) ); return; } my $fail; my $distdir; TRY: { $dist->prepare( @_ ) or (++$fail, last TRY); eval { $mb->dispatch('distdir') }; if( $@ ) { error(loc("Could not run '%1': %2", 'Build distdir', "$@")); ++$fail, last TRY; } ### /path/to/Foo-Bar-1.2/Foo-Bar-1.2 $distdir = File::Spec->catdir( $dir, $self->package_name . '-' . $self->package_version ); unless( -d $distdir ) { error(loc("Do not know where '%1' got created", 'distdir')); ++$fail, last TRY; } } unless( $cb->_chdir( dir => $orig ) ) { error( loc( "Could not chdir to start directory '%1'", $orig ) ); return; } return if $fail; return $distdir; } =head1 KNOWN ISSUES Below are some of the known issues with Module::Build, that we hope the authors will resolve at some point, so we can make full use of Module::Build's power. The number listed is the bug number on C<rt.cpan.org>. =over 4 =item * Uninstall modules installed by Module::Build (#13308) Module::Build doesn't write a so called C<packlist> file, which holds a list of all files installed by a distribution. Without this file we don't know what to remove. Until Module::Build generates this C<packlist>, we are unable to remove any installations done by it. =item * Module::Build's version comparison is not supported. Module::Build has its own way of defining what versions are considered satisfactory for a prerequisite, and which ones aren't. This syntax is something specific to Module::Build and we currently have no way to see if a module on disk, on cpan or something similar is satisfactory according to Module::Build's version comparison scheme. As a work around, we now simply assume that the most recent version on CPAN satisfies a dependency. =item * Module::Build doesn't support 'PREFIX' (#8759) Module::Build doens't support the standard C<Makefile.PL> argument C<PREFIX> and dies if it is provided. Even though that's not usually a problem, sometimes M::B enabled distros ship a C<Makefile.PL> that calls the C<Build.PL> under the hood. In these cases, a C<PREFIX> might be provided and C<Module::Build> will die. =item * Module::Build masquerades as Makefile.PL but is not compatible (#13145) Related to the previous entry, C<Module::Build> can create a C<Makefile.PL> which under the hood invokes C<Module::Build>. It however does not support all the options that C<ExtUtils::MakeMaker> does, and will die if you try to invoke the file with one of those options. =item * Module::Build can not be upgraded using it's own API (#13169) This is due to the fact that the Build file insists on adding a path to C<@INC> which force the loading of the C<not yet installed> Module::Build when it shells out to run it's own build procedure: =item * Module::Build does not provide access to install history (#9793) C<Module::Build> runs the create, test and install procedures in it's own processes, but does not provide access to any diagnostic messages of those processes. As an end result, we can not offer these diagnostic messages when, for example, reporting automated build failures to sites like C<testers.cpan.org>. =back =head1 AUTHOR This module by Jos Boumans E<lt>ka...@cp...<gt>. =head1 COPYRIGHT The CPAN++ interface (of which this module is a part of) is copyright (c) 2001, 2002, 2003, 2004, 2005 Jos Boumans E<lt>ka...@cp...<gt>. All rights reserved. This library is free software; you may redistribute and/or modify it under the same terms as Perl itself. =cut 1; # Local variables: # c-indentation-style: bsd # c-basic-offset: 4 # indent-tabs-mode: nil # End: # vim: expandtab shiftwidth=4: |
|
From: Ken W. <kwi...@us...> - 2005-08-04 01:36:12
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18284 Added Files: MANIFEST MANIFEST.SKIP META.yml Makefile.PL README Log Message: Initial checkin of Jos' code --- NEW FILE: README --- This is the README file for CPANPLUS::Dist::Build, a CPANPLUS plugin to install modules that use 'Module::Build' as their installer Please refer to 'perldoc CPANPLUS::Dist::Build' after installation for details. ##################################################################### * Description Params::Check CPANPLUS::Dist::Build is a distribution class for Module::Build related modules. Using this package, you can create, install and uninstall perl modules. It inherits from CPANPLUS::Dist. Normal users won't have to worry about the interface to this module, as it functions transparently as a plug-in to CPANPLUS and will just Do The Right Thing when it's loaded. ##################################################################### * Installation CPANPLUS::Dist::Build follows the standard perl module install process perl Makefile.PL make make test make install The module uses no C or XS parts, so no c-compiler is required. ###################################################################### AUTHOR This module by Jos Boumans <ka...@cp...>. COPYRIGHT This module is copyright (c) 2005 Jos Boumans <ka...@cp...>. All rights reserved. This library is free software; you may redistribute and/or modify it under the same terms as Perl itself. --- NEW FILE: MANIFEST --- lib/CPANPLUS/Dist/Build.pm lib/CPANPLUS/Dist/Build/Constants.pm Makefile.PL MANIFEST This list of files MANIFEST.SKIP META.yml README t/01_CPANPLUS-Dist-Build-Constants.t t/02_CPANPLUS-Dist-Build.t t/dummy-perl/.hidden t/dummy-perl/lib/.hidden t/dummy-perl/man/man1/.hidden t/dummy-perl/man/man3/.hidden t/src/noxs/Foo-Bar-0.01.tar.gz t/src/xs/Foo-Bar-0.01.tar.gz --- NEW FILE: META.yml --- # http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: CPANPLUS-Dist-Build version: 0.02 version_from: lib/CPANPLUS/Dist/Build.pm installdirs: site requires: CPANPLUS: 0.055 File::Spec: 0 IPC::Cmd: 0.23 Locale::Maketext::Simple: 0 Module::Build: 0.2611 Module::Load::Conditional: 0.06 Module::Pluggable: 2.4 Params::Check: 0.22 Test::More: 0 distribution_type: module generated_by: ExtUtils::MakeMaker version 6.25 --- NEW FILE: Makefile.PL --- use ExtUtils::MakeMaker; use strict; WriteMakefile ( NAME => 'CPANPLUS::Dist::Build', VERSION_FROM => 'lib/CPANPLUS/Dist/Build.pm', # finds $VERSION dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz' }, PREREQ_PM => { 'Test::More' => 0, 'CPANPLUS' => '0.055', 'Locale::Maketext::Simple' => 0, 'Params::Check' => '0.22', 'IPC::Cmd' => '0.23', 'Module::Load::Conditional' => '0.06', 'Module::Pluggable' => '2.4', 'Module::Build' => '0.2611', 'File::Spec' => 0, }, AUTHOR => 'Jos Boumans <kane[at]cpan.org>', ABSTRACT => 'CPANPLUS plugin to install packages that use Build.PL', ); --- NEW FILE: MANIFEST.SKIP --- ^t/dummy-perl/lib/(?!\.hidden) ^t/dummy-perl/man/man1/(?!\.hidden) ^t/dummy-perl/man/man3/(?!\.hidden) ^t/dummy-perl/script/(?!\.hidden) ^blib/ ^t/\..* ^pmfiles.dat$ ^Makefile$ ^Makefile.old$ ^MANIFEST.bak$ ^pm_to_blib ^blibdirs ^TODO$ ^cover_db/ ^tmp/ ^samples/ ^CPANPLUS.*gz$ \.DS_Store$ \.swp$ \.orig$ \.rpt$ ^patches/ |
|
From: Ken W. <kwi...@us...> - 2005-08-04 01:36:12
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18284/lib/CPANPLUS/Dist/Build Added Files: Constants.pm Log Message: Initial checkin of Jos' code --- NEW FILE: Constants.pm --- package CPANPLUS::Dist::Build::Constants; use strict; use File::Spec; BEGIN { require Exporter; use vars qw[$VERSION @ISA @EXPORT]; $VERSION = 0.01; @ISA = qw[Exporter]; @EXPORT = qw[ BUILD_DIR BUILD ]; } use constant BUILD_DIR => sub { return @_ ? File::Spec->catdir($_[0], '_build') : '_build'; }; use constant BUILD => sub { return @_ ? File::Spec->catfile($_[0], 'Build') : 'Build'; }; 1; # Local variables: # c-indentation-style: bsd # c-basic-offset: 4 # indent-tabs-mode: nil # End: # vim: expandtab shiftwidth=4: |
|
From: Ken W. <kwi...@us...> - 2005-08-04 01:35:04
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/t/dummy-perl/man/man3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17940/t/dummy-perl/man/man3 Log Message: Directory /cvsroot/module-build/CPANPLUS-Dist-Build/t/dummy-perl/man/man3 added to the repository |
|
From: Ken W. <kwi...@us...> - 2005-08-04 01:35:04
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/t/dummy-perl/man/man1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17940/t/dummy-perl/man/man1 Log Message: Directory /cvsroot/module-build/CPANPLUS-Dist-Build/t/dummy-perl/man/man1 added to the repository |
|
From: Ken W. <kwi...@us...> - 2005-08-04 01:35:02
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17940/lib/CPANPLUS/Dist/Build Log Message: Directory /cvsroot/module-build/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build added to the repository |
|
From: Ken W. <kwi...@us...> - 2005-08-04 01:34:06
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/t/src/noxs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17739/t/src/noxs Log Message: Directory /cvsroot/module-build/CPANPLUS-Dist-Build/t/src/noxs added to the repository |
|
From: Ken W. <kwi...@us...> - 2005-08-04 01:34:06
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/t/dummy-perl/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17739/t/dummy-perl/lib Log Message: Directory /cvsroot/module-build/CPANPLUS-Dist-Build/t/dummy-perl/lib added to the repository |
|
From: Ken W. <kwi...@us...> - 2005-08-04 01:34:06
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/t/dummy-perl/man In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17739/t/dummy-perl/man Log Message: Directory /cvsroot/module-build/CPANPLUS-Dist-Build/t/dummy-perl/man added to the repository |
|
From: Ken W. <kwi...@us...> - 2005-08-04 01:34:06
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/t/src/xs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17739/t/src/xs Log Message: Directory /cvsroot/module-build/CPANPLUS-Dist-Build/t/src/xs added to the repository |
|
From: Ken W. <kwi...@us...> - 2005-08-04 01:34:06
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17739/lib/CPANPLUS/Dist Log Message: Directory /cvsroot/module-build/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist added to the repository |