Re: [Module-build-general] Proposal for Module::Build installation dirs
Status: Beta
Brought to you by:
kwilliams
|
From: Jeff M. <jef...@e-...> - 2003-05-16 15:30:11
|
On Wed, 2003-05-14 at 15:53, Ken Williams wrote:
> On Wednesday, May 14, 2003, at 12:59 PM, Jeff Macdonald wrote:
> >
> > I use PREFIX and LIB all the time now and I haven't had any problems
> > with it yet. Currently M::B doesn't work correctly with builddir or
> > sitelib when doing a build test or install (see earlier postings about
> > @INC from a fellow subscriber).
>
> You mean the thread where I called M::B's support for local
> installation directories "woefully inadequate"? I know M::B doesn't
> install (nicely) to arbitrary directories, that's sort of my whole
> point.
>
> What do you mean "builddir" and "sitelib"?
Ack, builddir should of been destdir and when I rerun the compile
destdir does what it should do. It also turns out it's not what I want.
It seems I want sitelib (but maybe I'm mis-understanding what sitelib
is):
>From the README:
Alternatively, you could specify the "sitelib" parameter when you run
the "Build.PL" script:
perl Build.PL sitelib=/my/secret/place/
Under normal circumstances, you'll need superuser privileges to install
into your system's default "sitelib" directory.
> >
> > So while there may be magic behind PREFIX, I don't think it is fair for
> > the average module builder to have to know specifics about %Config
> > either.
>
> In the scheme I proposed, the user has to know *less* about %Config
> than under MakeMaker, because under MakeMaker you have to understand
> how PREFIX interacts with your particular %Config settings in order to
> arrive at the installation paths. My scheme would just install in the
> obvious way under wherever you tell it to install.
I re-read your earlier message and I think I understand what your are saying now.
> > I need M::B to be able to install stuff outside the system perl tree.
> > MakeMaker allows me to do that today using PREFIX and LIB (I set both
> > to
> > the same value). All I have to do in my code is add a:
> >
> > use lib qw(<path specified by PREFIX>);
>
> Yeah, that's why we're working on getting this working.
>
> Incidentally, Module::Build already lets you install to whatever
> directory you want, it's just not pretty:
>
> perl Build.PL config='siteperl=/foo/bar sitearch=/foo/bar/i386-linux
> installscript=/foo/bar/bin'
Yes, it's butt ugly and requires me to know about %Config and
what my archname is. I guess just setting sitelib isn't enough or
doesn't do what I thought it would do. Here's some output of Build,
I apologize for long lines below. I realize that it pass the tests
but it does issue warnings and it also shows the @INC problem and
it trying to install into a directory it doesn't have permission to.
Let me know how I can help (I'm about to try that patch you just sent out):
PERL5LIB=/home/jeff/projects/mail-parser-5.0.1/build/YAML-0.35/blib/lib:/home/jeff/projects/mail-parser-5.0.1/build/Module-Info-0.19/blib/lib:/home/jeff/projects/mail-parser-5.0.1/build/ExtUtils-ParseXS-2.02/blib/lib:/home/jeff/projects/mail-parser-5.0.1/build/Archive-Tar-0.23/blib/lib perl Build.PL sitelib=/home/jeff/projects/mail-parser-5.0.1/test-install/lib
Checking whether your kit is complete...
Looks good
Creating new 'Build' script for 'Module-Build' version '0.18'
...
PERL5LIB=/home/jeff/projects/mail-parser-5.0.1/build/YAML-0.35/blib/lib:/home/jeff/projects/mail-parser-5.0.1/build/Module-Info-0.19/blib/lib:/home/jeff/projects/mail-parser-5.0.1/build/ExtUtils-ParseXS-2.02/blib/lib:/home/jeff/projects/mail-parser-5.0.1/build/Archive-Tar-0.23/blib/lib ./Build test && ./Build install;
t/basic.........ok
t/runthrough....ok 4/13B::Module::Info,packages use failed with 2 saying:
Can't locate B/Module/Info.pm in @INC (@INC contains: /home/jeff/projects/mail-parser-5.0.1/build/Module-Build-0.18/blib/lib /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at (eval 1) line 18.
BEGIN failed--compilation aborted at (eval 1) line 18.
BEGIN failed--compilation aborted.
t/runthrough....ok 6/13B::Module::Info,packages use failed with 2 saying:
Can't locate B/Module/Info.pm in @INC (@INC contains: /home/jeff/projects/mail-parser-5.0.1/build/Module-Build-0.18/blib/lib /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at (eval 1) line 18.
BEGIN failed--compilation aborted at (eval 1) line 18.
BEGIN failed--compilation aborted.
t/runthrough....ok
t/xs............ok
All tests successful.
Files=3, Tests=32, 161 wallclock secs ( 9.76 cusr + 0.81 csys = 10.57 CPU)
Warning: You do not have permissions to install into /usr/lib/perl5/site_perl/5.8.0 at /usr/lib/perl5/5.8.0/ExtUtils/Install.pm line 84.
mkdir /usr/lib/perl5/site_perl/5.8.0/Module: Permission denied at /usr/lib/perl5/5.8.0/ExtUtils/Install.pm line 137
make: *** [/home/jeff/projects/mail-parser-5.0.1/test-install/lib/Module/Build.pm] Error 255
--
Jeff Macdonald <jef...@e-...>
|