Unverified Commit 4c69dd5e authored by Yt's avatar Yt Committed by GitHub
Browse files

pythonPackages: prevent incorrect package definitions (#394838)

parents 5f0f90f2 f42cd833
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ let

  frontend = callPackage ./frontend.nix { };
in
python.pkgs.pythonPackages.buildPythonPackage {
python.pkgs.buildPythonPackage {
  pname = "tandoor-recipes";

  inherit (common) version src;
+0 −1
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@
  pytest-mock,
  pytestCheckHook,
  pydantic,
  python3,
  pyyaml,
  toml,
}:
+2 −2
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
  fetchFromGitHub,
  setuptools,
  django,
  python3,
  python,
  django-guardian,
}:

@@ -27,7 +27,7 @@ buildPythonPackage rec {
  checkInputs = [ django-guardian ];

  checkPhase = ''
    ${python3.interpreter} tests/manage.py test
    ${python.interpreter} tests/manage.py test
  '';

  pythonImportsCheck = [ "django_fsm" ];
+8 −3
Original line number Diff line number Diff line
{
  python3,
  fetchFromGitHub,
  buildPythonPackage,
  lib,
  setuptools,
  requests,
  tqdm,
  psutil,
  toml,
  pip,
}:
buildPythonPackage rec {
  pname = "language-tool-python";
@@ -17,8 +22,8 @@ buildPythonPackage rec {
    hash = "sha256-CiKwuCMfgU7Vo0rwbKyI++EJBuKBrN1q7alwYGKuXXQ=";
  };

  build-system = [ python3.pkgs.setuptools ];
  dependencies = with python3.pkgs; [
  build-system = [ setuptools ];
  dependencies = [
    requests
    tqdm
    psutil
+25 −0
Original line number Diff line number Diff line
@@ -32,6 +32,31 @@ in
### Deprecated aliases - for backward compatibility

mapAliases ({
  # Prevent incorrect Python packaging attempts.
  # Note: `{ python3, python3Packages, ... }: with python3Packages; [ ... python3 ]` still works, since `with` has lower priority.
  pythonPackages = throw "do not use pythonPackages when building Python packages, specify each used package as a separate argument"; # do not remove
  python2Packages = throw "do not use python2Packages when building Python packages, specify each used package as a separate argument"; # do not remove
  python27Packages = throw "do not use python27Packages when building Python packages, specify each used package as a separate argument"; # do not remove
  python3Packages = throw "do not use python3Packages when building Python packages, specify each used package as a separate argument"; # do not remove
  python39Packages = throw "do not use python39Packages when building Python packages, specify each used package as a separate argument"; # do not remove
  python310Packages = throw "do not use python310Packages when building Python packages, specify each used package as a separate argument"; # do not remove
  python311Packages = throw "do not use python311Packages when building Python packages, specify each used package as a separate argument"; # do not remove
  python312Packages = throw "do not use python312Packages when building Python packages, specify each used package as a separate argument"; # do not remove
  python313Packages = throw "do not use python313Packages when building Python packages, specify each used package as a separate argument"; # do not remove
  python2 = throw "do not use python2 when building Python packages, use the generic python parameter instead"; # do not remove
  python3 = throw "do not use python3 when building Python packages, use the generic python parameter instead"; # do not remove
  python39 = throw "do not use python39 when building Python packages, use the generic python parameter instead"; # do not remove
  python310 = throw "do not use python310 when building Python packages, use the generic python parameter instead"; # do not remove
  python311 = throw "do not use python311 when building Python packages, use the generic python parameter instead"; # do not remove
  python312 = throw "do not use python312 when building Python packages, use the generic python parameter instead"; # do not remove
  python313 = throw "do not use python313 when building Python packages, use the generic python parameter instead"; # do not remove
  pypy = throw "do not use pypy when building Python packages, use the generic python parameter instead"; # do not remove
  pypy2 = throw "do not use pypy2 when building Python packages, use the generic python parameter instead"; # do not remove
  pypy27 = throw "do not use pypy27 when building Python packages, use the generic python parameter instead"; # do not remove
  pypy3 = throw "do not use pypy3 when building Python packages, use the generic python parameter instead"; # do not remove
  pypy310 = throw "do not use pypy310 when building Python packages, use the generic python parameter instead"; # do not remove
  pypy311 = throw "do not use pypy311 when building Python packages, use the generic python parameter instead"; # do not remove

  aadict = throw "aadict was removed, it was introduced as a dependency for a package that never manifested and has been an unused leaf package ever since"; # added 2024-07-08
  abodepy = jaraco-abode; # added 2023-02-01
  acebinf = throw "acebinf has been removed because it is abandoned and broken."; # Added 2023-05-19