Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^4: Clean smoke-test install for Inline based modules using Inline::MakeMaker

by davido (Archbishop)
on Dec 15, 2011 at 06:23 UTC ( #943656=note: print w/replies, xml ) Need Help??


in reply to Re^3: Clean smoke-test install for Inline based modules using Inline::MakeMaker
in thread Clean smoke-test install for Inline based modules using Inline::MakeMaker

The purpose of CONFIGURE_REQUIRES (ExtUtils::MakeMaker and Inline::MakeMaker) seems to be to get a dependency listed in the META.json and META.yml files when the author executes make dist such that the dependency is pulled in by cpan before the target system executes Makefile.PL

At least that's what I gather by reading the docs for cpan.pm and ExtUtils::MakeMaker. As has been pointed out elsewhere in this thread earlier versions of ExtUtils::MakeMaker (and probably Inline::MakeMaker) didn't support the CONFIGURE_REQUIRES directive. But my theory is that if the distribution is built with a modern version, and if the CONFIGURE_REQUIRES specifies a more modern version of *::MakeMaker, those dependencies will be pulled in ahead of the target system actually running Makefile.PL.

I believe the other mistake I was making was listing 'Inline' as the BUILD_REQUIRES dependency. I believe BUILD_REQUIRES is "too late", whereas CONFIGURE_REQURIES directs an earlier stage in the process. By re-reading the MakeMaker docs I also see that the dependency should list modules (such as Inline::MakeMaker), not distributions (such as Inline, which includes the Inline::MakeMaker module). I had thought that Inline would pull in Inline::MakeMaker. But the docs are pretty clear that the module should be listed.

I've made a new attempt for Math::Prime::FastSieve wherein I'm specifying Inline::MakeMaker 0.45 and ExtUtils::MakeMaker 6.62 as CONFIGURE_REQUIRES modules. I believe that by specifying CONFIGURE_REQUIRES when creating the distribution, and by specifying modern versions of those required modules, the cpan shell should pick up on this and upgrade those modules. The docs for cpan.pm do mention that cpan reads the META.yml file to detect dependencies.

Within a couple of days enough smoke tests should trickle in that I'll have a better idea if this fixes the issue. If not, I may have to shift gears to Module::Install, or inline Inline::MakeMaker's code into Makefile.PL. Neither of those approaches seem anywhere near optimal; Module::Install adds yet another dependency that is outside of the Inline realm, and inlining additional code into Makefile.PL is going to become a kludge.

I'll report back once I see how the smoke tests turn out. As I mentioned on the Inline mailing list, once we determine what steps are needed we'll want to get Inline's documentation updated to assist the next guy to come along.


Dave

Replies are listed 'Best First'.
Re^5: Clean smoke-test install for Inline based modules using Inline::MakeMaker
by syphilis (Chancellor) on Dec 15, 2011 at 07:44 UTC
    As has been pointed out elsewhere in this thread earlier versions of ExtUtils::MakeMaker (and probably Inline::MakeMaker) didn't support the CONFIGURE_REQUIRES directive

    The critical thing would be the version of the cpan module being run by the user, and the version of EU::MM that the user has installed.

    Inline::MakeMaker is just the hapless module that needs to be present.
    It should just ignore the CONFIGURE_REQUIRES - which should be fine. By the time we get to the stage where Inline::MakeMaker realizes it doesn't know what CONFIGURE_REQUIRES is, "CONFIGURE_REQUIRES" will already have served its purpose (if all goes as planned).

    Anyway, let's see if that works.
    Here's hoping :-)

    Cheers,
    Rob
Re^5: Clean smoke-test install for Inline based modules using Inline::MakeMaker
by bingos (Vicar) on Dec 15, 2011 at 11:30 UTC

    The CONFIGURE_REQUIRES directive is only really required to be supported on the distribution author's 'machine', not on end-users' machines.

    App-EUMM-Upgrade is a good tool for upgrading a Makefile.PL that produces something like this, any fancy features will be removed when it is run on the end-users' configuration.

    'configure_requires' itself is documented in the CPAN::Meta::Spec. CPAN clients ( such as cpan, cpanp and cpanm ) will read any META.yml/META.json file included with a distribution and resolve any modules listed as 'configure_requires' before executing Makefile.PL/Build.PL.

Re^5: Clean smoke-test install for Inline based modules using Inline::MakeMaker
by Anonymous Monk on Dec 15, 2011 at 09:06 UTC

    Within a couple of days enough smoke tests should trickle in that I'll have a better idea if this fixes the issue.

    Well, it should fix it , it does in my testing.

    cpanp -u Inline::CPP Inline Math::Prime::FastSieve --force cpanp -i DAVIDO/Math-Prime-FastSieve-0.04.tar.gz

    You can test before uploading for this issue with

    #!/usr/bin/perl -- use strict; use warnings; use URI::file; my $file = q[Math-Prime-FastSieve-0.04.tar.gz]; $file = URI::file->new( $file )->abs(URI::file->cwd); system qw[ cpanp -u Inline::CPP Inline Math::Prime::FastSieve --for +ce ]; system qw[ cpanp -i ], $file , qw[ --skiptest --no-allow_build_inter +activity ];

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://943656]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2018-07-19 04:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (401 votes). Check out past polls.

    Notices?