mongodb: pick python version from scons

The python modules that we to the enviroment should always come from the
same python version as scons as otherwise they can't be loaded.

This unbreaks the build of mongodb 4.2 which pinned python to 3.8 while
our python attribute moved on to 3.9 which is what scons uses now.
This commit is contained in:
Andreas Rammhold 2021-08-14 13:39:37 +02:00
parent 218df5159c
commit cd20497c66
No known key found for this signature in database
GPG key ID: E432E410B5E48C86

View file

@ -1,5 +1,5 @@
{ lib, stdenv, fetchurl, sconsPackages, boost, gperftools, pcre-cpp, snappy, zlib, libyamlcpp
, sasl, openssl, libpcap, python27, python38, curl, Security, CoreFoundation, cctools }:
, sasl, openssl, libpcap, curl, Security, CoreFoundation, cctools }:
# Note:
# The command line tools are written in Go as part of a different package (mongodb-tools)
@ -12,17 +12,16 @@ with lib;
let
variants = if versionAtLeast version "4.2"
then { python = python38.withPackages (ps: with ps; [ pyyaml cheetah3 psutil setuptools ]);
then rec { python = scons.python.withPackages (ps: with ps; [ pyyaml cheetah3 psutil setuptools ]);
scons = sconsPackages.scons_latest;
mozjsVersion = "60";
mozjsReplace = "defined(HAVE___SINCOS)";
}
else { python = python27.withPackages (ps: with ps; [ pyyaml typing cheetah ]);
else rec { python = scons.python.withPackages (ps: with ps; [ pyyaml typing cheetah ]);
scons = sconsPackages.scons_3_1_2;
mozjsVersion = "45";
mozjsReplace = "defined(HAVE_SINCOS)";
};
python = python27.withPackages (ps: with ps; [ pyyaml typing cheetah ]);
system-libraries = [
"boost"
"pcre"