Unverified Commit 241cb41e authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

treewide: remove python = python3 (#405470)

parents 039e8a79 03432cd2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
  gitSupport ? false,
  git,
  docutilsSupport ? false,
  python,
  python3,
  docutils,
  monotoneSupport ? false,
  monotone,
@@ -68,7 +68,7 @@ stdenv.mkDerivation rec {
      CryptSSLeay
    ])
    ++ lib.optionals docutilsSupport [
      (python.withPackages (pp: with pp; [ pygments ]))
      (python3.withPackages (pp: with pp; [ pygments ]))
      docutils
    ]
    ++ lib.optionals gitSupport [ git ]
+4 −4
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
  stdenv,
  lib,
  fetchFromGitHub,
  python,
  python3,
  makeWrapper,
  eigen_3_4_0,
  fftw,
@@ -20,7 +20,7 @@
  withGui ? true,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation {
  pname = "mrtrix";
  version = "3.0.4-unstable-2025-04-09";

@@ -35,14 +35,14 @@ stdenv.mkDerivation rec {
  nativeBuildInputs = [
    makeWrapper
    less
    python
    python3
  ] ++ lib.optional withGui qt5.wrapQtAppsHook;

  buildInputs =
    [
      ants
      eigen_3_4_0
      python
      python3
      fftw
      libtiff
      libpng
+6 −6
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
  pkgs,
  lib,
  glibcLocales,
  python,
  python3,
  fetchpatch,
  fetchFromGitHub,
  # Usage: bumblebee-status.override { plugins = p: [p.arandr p.bluetooth2]; };
@@ -13,13 +13,13 @@ let

  # { <name> = { name = "..."; propagatedBuildInputs = [ ... ]; buildInputs = [ ... ]; } }
  allPlugins = lib.mapAttrs (name: value: value // { inherit name; }) (
    import ./plugins.nix { inherit pkgs python; }
    import ./plugins.nix { inherit pkgs python3; }
  );

  # [ { name = "..."; propagatedBuildInputs = [ ... ]; buildInputs = [ ... ]; } ]
  selectedPlugins = plugins allPlugins;
in
python.pkgs.buildPythonPackage {
python3.pkgs.buildPythonPackage {
  pname = "bumblebee-status";
  inherit version;

@@ -42,7 +42,7 @@ python.pkgs.buildPythonPackage {
  buildInputs = lib.concatMap (p: p.buildInputs or [ ]) selectedPlugins;
  propagatedBuildInputs = lib.concatMap (p: p.propagatedBuildInputs or [ ]) selectedPlugins;

  checkInputs = with python.pkgs; [
  checkInputs = with python3.pkgs; [
    freezegun
    netifaces
    psutil
@@ -60,7 +60,7 @@ python.pkgs.buildPythonPackage {
    # FIXME: We skip the `dunst` module tests, some of which fail with
    # `RuntimeError: killall -s SIGUSR2 dunst not found`.
    # This is not solved by adding `pkgs.killall` to `checkInputs`.
    ${python.interpreter} -m pytest -k 'not test_dunst.py'
    ${python3.interpreter} -m pytest -k 'not test_dunst.py'

    runHook postCheck
  '';
@@ -70,7 +70,7 @@ python.pkgs.buildPythonPackage {
    find $out -name "__pycache__" -type d | xargs rm -rv

    # Make themes available for bumblebee-status to detect them
    cp -r ./themes $out/${python.sitePackages}
    cp -r ./themes $out/${python3.sitePackages}
  '';

  meta = with lib; {
+5 −5
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
  fetchFromGitHub,
  cmake,
  ninja,
  python,
  python3,
  withGodef ? true,
  godef,
  withGopls ? true,
@@ -22,7 +22,7 @@
stdenv.mkDerivation {
  pname = "ycmd";
  version = "unstable-2023-11-06";
  disabled = !python.isPy3k;
  disabled = !python3.isPy3k;

  # required for third_party directory creation
  src = fetchFromGitHub {
@@ -38,7 +38,7 @@ stdenv.mkDerivation {
    ninja
  ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
  buildInputs =
    with python.pkgs;
    with python3.pkgs;
    with llvmPackages;
    [
      abseil-cpp
@@ -54,7 +54,7 @@ stdenv.mkDerivation {

  buildPhase = ''
    export EXTRA_CMAKE_ARGS="-DPATH_TO_LLVM_ROOT=${llvmPackages.libllvm} -DUSE_SYSTEM_ABSEIL=true"
    ${python.pythonOnBuildForHost.interpreter} build.py --system-libclang --clang-completer --ninja
    ${python3.pythonOnBuildForHost.interpreter} build.py --system-libclang --clang-completer --ninja
  '';

  dontConfigure = true;
@@ -75,7 +75,7 @@ stdenv.mkDerivation {
      find third_party -type d -name "test" -exec rm -rf {} +

      chmod +x ycmd/__main__.py
      sed -i "1i #!${python.interpreter}\
      sed -i "1i #!${python3.interpreter}\
      " ycmd/__main__.py

      mkdir -p $out/lib/ycmd
+10 −10
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
  libpng,
  boost,
  guile,
  python,
  python3,
  qtbase,
}:

@@ -32,7 +32,7 @@ stdenv.mkDerivation {
    cmake
    ninja
    pkg-config
    python.pkgs.pythonImportsCheckHook
    python3.pkgs.pythonImportsCheckHook
  ];
  buildInputs = [
    eigen_3_4_0
@@ -40,7 +40,7 @@ stdenv.mkDerivation {
    libpng
    boost
    guile
    python
    python3
    qtbase
  ];

@@ -59,11 +59,11 @@ stdenv.mkDerivation {

    substituteInPlace libfive/bind/python/CMakeLists.txt \
      --replace ' ''${PYTHON_SITE_PACKAGES_DIR}' \
                " $out/${python.sitePackages}" \
                " $out/${python3.sitePackages}" \

    substituteInPlace libfive/bind/python/libfive/ffi.py \
      --replace "os.path.join('libfive', folder)" \
                "os.path.join('$out/${python.sitePackages}/libfive', folder)" \
                "os.path.join('$out/${python3.sitePackages}/libfive', folder)" \

    export XDG_CACHE_HOME=$(mktemp -d)/.cache
  '';
@@ -91,14 +91,14 @@ stdenv.mkDerivation {
      ln -s "$out/bin/Studio" "$out/bin/libfive-studio"

      # Create links since libfive looks for the library in a specific path.
      mkdir -p "$out/${python.sitePackages}/libfive/src"
      ln -s "$out"/lib/libfive.* "$out/${python.sitePackages}/libfive/src/"
      mkdir -p "$out/${python.sitePackages}/libfive/stdlib"
      ln -s "$out"/lib/libfive-stdlib.* "$out/${python.sitePackages}/libfive/stdlib/"
      mkdir -p "$out/${python3.sitePackages}/libfive/src"
      ln -s "$out"/lib/libfive.* "$out/${python3.sitePackages}/libfive/src/"
      mkdir -p "$out/${python3.sitePackages}/libfive/stdlib"
      ln -s "$out"/lib/libfive-stdlib.* "$out/${python3.sitePackages}/libfive/stdlib/"

      # Create links so Studio can find the bindings.
      mkdir -p "$out/libfive/bind"
      ln -s "$out/${python.sitePackages}" "$out/libfive/bind/python"
      ln -s "$out/${python3.sitePackages}" "$out/libfive/bind/python"
    '';

  pythonImportsCheck = [
Loading