Re: Postgres Windows build system doesn't work with python installed in Program Files

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Victor Wagner <vitus(at)wagner(dot)pp(dot)ru>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Postgres Windows build system doesn't work with python installed in Program Files
Date: 2020-05-01 08:52:15
Message-ID: 20200501085215.GB409463@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 30, 2020 at 03:06:08PM +0300, Victor Wagner wrote:
> Fix is very simple, see attach.
>
> Patch is made against REL_12_STABLE, but probably applicable to other
> versions as well.

Indeed, thanks.

> my $pythonprog = "import sys;print(sys.prefix);"
> . "print(str(sys.version_info[0])+str(sys.version_info[1]))";
> my $prefixcmd =
> - $solution->{options}->{python} . "\\python -c \"$pythonprog\"";
> + '"' . $solution->{options}->{python} . "\\python\" -c \"$pythonprog\"";
> my $pyout = `$prefixcmd`;
> die "Could not query for python version!\n" if $?;
> my ($pyprefix, $pyver) = split(/\r?\n/, $pyout);

This reminds me of ad7595b. Wouldn't it be better to use qq() here?
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Victor Wagner 2020-05-01 09:48:17 Re: Postgres Windows build system doesn't work with python installed in Program Files
Previous Message Michael Paquier 2020-05-01 08:45:59 Re: pg_rewind docs correction