<commit_before># Copyright: 2005 The Perl Foundation.  All Rights Reserved.
# $Id$

=head1 NAME

config/auto/python - Check whether python is there

=head1 DESCRIPTION

Determines whether python is there.
Checks also whether we have Python 2.4.

=head1 TODO

Store version of Python.

=cut

package Configure::Step;

use strict;
use vars qw($description @args);
use Parrot::Configure::Step ':auto';

$description = "Determining whether python is installed...";

@args = qw(verbose);

sub runstep {
    my $a = `python -V 2>&1` || '';
    my ($python, $major, $minor, $revision) = 
        $a =~ m/(Python)\s+(\d+).(\d+).(\d+)/;
    my $has_python = $python ? 1 : 0;

    Configure::Data->set(has_python => $has_python);<commit_msg>Applied patch http://rt.perl.org/rt3/index.html?q=34684, a less strict match of Python's version string.<commit_after># Copyright: 2005 The Perl Foundation.  All Rights Reserved.
# $Id$

=head1 NAME

config/auto/python - Check whether python is there

=head1 DESCRIPTION

Determines whether python is there.
Checks also whether we have Python 2.4.

=head1 TODO

Store version of Python.

=cut

package Configure::Step;

use strict;
use vars qw($description @args);
use Parrot::Configure::Step ':auto';

$description = "Determining whether python is installed...";

@args = qw(verbose);

sub runstep {
    my $a = `python -V 2>&1` || '';
    my ($python, $major, $minor, $revision) = 
        $a =~ m/(Python)\s+(\d+).(\d+)(?:.(\d+))?/;
    $revision = 0 unless defined $revision;
    my $has_python = $python ? 1 : 0;

    Configure::Data->set(has_python => $has_python);
{'fraction_non_alphanumeric': 0.1560549313358302, 'fraction_numerical': 0.020599250936329586, 'mean_word_length': 3.7850746268656716, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3909364', 'n_tokens_mistral': 585, 'n_tokens_neox': 538, 'n_words': 172}