Merge pull request #117570 from FRidh/python2alias

Python: be explicit on whether it is python2 or python3 that is used
This commit is contained in:
Frederik Rietdijk
2021-03-25 13:26:35 +01:00
committed by GitHub
70 changed files with 260 additions and 170 deletions

View File

@@ -2,7 +2,7 @@
, fetchFromGitHub
, git
, go
, python
, python3
, lib, stdenv
}:
@@ -22,7 +22,7 @@ buildBazelPackage rec {
sha256 = "0gigl1lg8sb4bj5crvj54329ws4yirldbncs15f96db6vhp0ig7r";
};
nativeBuildInputs = [ go git python ];
nativeBuildInputs = [ go git python3 ];
removeRulesCC = false;
bazelTarget = "//ibazel";

View File

@@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, lua5_3, python }:
{ lib, stdenv, fetchFromGitHub, lua5_3, python3 }:
stdenv.mkDerivation rec {
pname = "bam";
@@ -11,11 +11,13 @@ stdenv.mkDerivation rec {
sha256 = "13br735ig7lygvzyfd15fc2rdygrqm503j6xj5xkrl1r7w2wipq6";
};
buildInputs = [ lua5_3 python ];
nativeBuildInputs = [ lua5_3 python3 ];
buildPhase = "${stdenv.shell} make_unix.sh";
checkPhase = "${python.interpreter} scripts/test.py";
checkPhase = "${python3.interpreter} scripts/test.py";
strictDeps = true;
installPhase = ''
mkdir -p "$out/share/bam"

View File

@@ -1,6 +1,6 @@
{ stdenv, callPackage, lib, fetchurl, fetchpatch, runCommand, makeWrapper
, zip, unzip, bash, writeCBin, coreutils
, which, python, perl, gawk, gnused, gnutar, gnugrep, gzip, findutils
, which, python3, perl, gawk, gnused, gnutar, gnugrep, gzip, findutils
# Apple dependencies
, cctools, llvmPackages_8, CoreFoundation, CoreServices, Foundation
# Allow to independently override the jdks used to build and run respectively
@@ -210,8 +210,8 @@ stdenv'.mkDerivation rec {
# Substitute python's stub shebang to plain python path. (see TODO add pr URL)
# See also `postFixup` where python is added to $out/nix-support
substituteInPlace src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt\
--replace "/usr/bin/env python" "${python}/bin/python" \
--replace "NIX_STORE_PYTHON_PATH" "${python}/bin/python" \
--replace "/usr/bin/env python" "${python3.interpreter}" \
--replace "NIX_STORE_PYTHON_PATH" "${python3.interpreter}" \
# md5sum is part of coreutils
sed -i 's|/sbin/md5|md5sum|' \
@@ -287,11 +287,13 @@ stdenv'.mkDerivation rec {
buildJdk
];
strictDeps = true;
# when a command cant be found in a bazel build, you might also
# need to add it to `defaultShellPath`.
nativeBuildInputs = [
zip
python
python3
unzip
makeWrapper
which
@@ -380,7 +382,7 @@ stdenv'.mkDerivation rec {
echo "${customBash} ${defaultShellPath}" >> $out/nix-support/depends
# The templates get tard up into a .jar,
# so nix cant detect python is needed in the runtime closure
echo "${python}" >> $out/nix-support/depends
echo "${python3}" >> $out/nix-support/depends
'';
dontStrip = true;

View File

@@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, python, emacs }:
{ lib, stdenv, fetchurl, python3, emacs }:
stdenv.mkDerivation rec {
pname = "cask";
@@ -12,9 +12,11 @@ stdenv.mkDerivation rec {
s f dash ansi ecukes servant ert-runner el-mock
noflet ert-async shell-split-string git package-build
] ++ [
python
python3
];
strictDeps = true;
buildPhase = ''
emacs --batch -L . -f batch-byte-compile cask.el cask-cli.el
'';

View File

@@ -1,4 +1,6 @@
{ lib, buildPythonApplication, buildPythonPackage, isPy3k, fetchurl, rpkg, offtrac, urlgrabber, pyopenssl, python_fedora }:
{ lib, python2Packages, fetchurl }:
with python2Packages;
let
fedora_cert = buildPythonPackage rec {

View File

@@ -1,6 +1,6 @@
{ stdenv, lib, fetchFromGitHub
, gcc-arm-embedded, libftdi1, libusb-compat-0_1, pkg-config
, python, pythonPackages
, python3
}:
with lib;
@@ -21,15 +21,16 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
gcc-arm-embedded pkg-config
python3
];
buildInputs = [
libftdi1
libusb-compat-0_1
python
pythonPackages.intelhex
];
strictDeps = true;
postPatch = ''
# Prevent calling out to `git' to generate a version number:
substituteInPlace src/Makefile \

View File

@@ -3,7 +3,7 @@
fetchFromGitHub,
cmake,
gtest,
python,
python3,
boost
}:
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
checkInputs = [ boost python ];
checkInputs = [ boost python3 ];
doCheck = true;

View File

@@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, popt, avahi, pkg-config, python, gtk2, runCommand
{ lib, stdenv, fetchFromGitHub, popt, avahi, pkg-config, python3, gtk2, runCommand
, gcc, autoconf, automake, which, procps, libiberty_static
, runtimeShell
, sysconfDir ? "" # set this parameter to override the default value $out/etc
@@ -18,7 +18,7 @@ let
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [popt avahi pkg-config python gtk2 autoconf automake which procps libiberty_static];
buildInputs = [popt avahi pkg-config python3 gtk2 autoconf automake which procps libiberty_static];
preConfigure =
''
export CPATH=$(ls -d ${gcc.cc}/lib/gcc/*/${gcc.cc.version}/plugin/include)

View File

@@ -1,4 +1,4 @@
{lib, stdenv, fetchurl, python}:
{lib, stdenv, fetchurl, python3}:
stdenv.mkDerivation {
name = "doclifter-2.19";
@@ -6,7 +6,9 @@ stdenv.mkDerivation {
url = "http://www.catb.org/~esr/doclifter/doclifter-2.19.tar.gz";
sha256 = "1as6z7mdjrrkw2kism41q5ybvyzvwcmj9qzla2fz98v9f4jbj2s2";
};
buildInputs = [ python ];
buildInputs = [ python3 ];
strictDeps = true;
makeFlags = [ "PREFIX=$(out)" ];