Re: Postgres Windows build system doesn't work with python installed in Program Files
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Victor Wagner <vitus@wagner.pp.ru>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-05-01T08:52:15Z
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
Commits
-
Improve perl script in MSVC to build binaries
- 404b912c5cab 14.0 landed
-
Handle spaces for Python install location in MSVC scripts
- ad53d6efef0c 9.5.22 landed
- e07fdc126ef3 9.6.18 landed
- 307ed98b0139 10.13 landed
- 984aca448d5d 11.8 landed
- 8c0939dadab0 12.3 landed
- beb2516e9614 13.0 landed
-
Use perl's $/ more idiomatically
- 8f00d84afc0d 13.0 cited