Alien-CPython3

 view release on metacpan or  search on metacpan

alienfile  view on Meta::CPAN

    $build->runtime_prop->{command} = 'python';

    $build->runtime_prop->{share_bin_dir_rel} = '.';
  };
}

sub _otool_libs {
  my ($file) = @_;

  my @libs = do {
    my ($ok, $err, $full_buf, $stdout_buff, $stderr_buff) = IPC::Cmd::run(
      command => [ qw(otool -L), $file  ],
      verbose => 0,
    ) or die;


    my @lines = split /\n/, join "", @$stdout_buff;

    # Output is a single line:
    #   - ": is not an object file"
    #   - ": object is not a Mach-O file type."

xt/author/00-compile.t  view on Meta::CPAN

use File::Spec;
use IPC::Open3;
use IO::Handle;

open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";

my @warnings;
for my $lib (@module_files)
{
    # see L<perlfaq8/How can I capture STDERR from an external command?>
    my $stderr = IO::Handle->new;

    diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
            $^X, @switches, '-e', "require q[$lib]"))
        if $ENV{PERL_COMPILE_TEST_DEBUG};

    my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
    binmode $stderr, ':crlf' if $^O eq 'MSWin32';
    my @_warnings = <$stderr>;
    waitpid($pid, 0);
    is($?, 0, "$lib loaded ok");

    shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
        and not eval { +require blib; blib->VERSION('1.01') };

    if (@_warnings)
    {
        warn @_warnings;
        push @warnings, @_warnings;



( run in 0.560 second using v1.01-cache-2.11-cpan-49f99fa48dc )