diff --git a/pkgs/development/python-modules/poetry/default.nix b/pkgs/tools/package-management/poetry/default.nix similarity index 79% rename from pkgs/development/python-modules/poetry/default.nix rename to pkgs/tools/package-management/poetry/default.nix index 83c91e847455..decc872c0501 100644 --- a/pkgs/development/python-modules/poetry/default.nix +++ b/pkgs/tools/package-management/poetry/default.nix @@ -1,52 +1,18 @@ { lib -, backports-cached-property -, buildPythonPackage -, cachecontrol -, cachy -, cleo -, crashtest -, deepdiff -, dulwich -, fetchFromGitHub -, filelock -, flatdict -, html5lib -, httpretty -, importlib-metadata -, installShellFiles -, intreehooks -, jsonschema -, keyring -, lockfile -, packaging -, pexpect -, pkginfo -, platformdirs -, poetry-core -, poetry-plugin-export -, pytest-mock -, pytest-xdist -, pytestCheckHook -, pythonAtLeast -, pythonOlder -, requests -, requests-toolbelt -, shellingham , stdenv -, tomli -, tomlkit -, trove-classifiers -, urllib3 -, virtualenv -, xattr +, python3 +, fetchFromGitHub +, installShellFiles }: -buildPythonPackage rec { +let + python = python3; +in python.pkgs.buildPythonApplication rec { pname = "poetry"; version = "1.3.1"; format = "pyproject"; - disabled = pythonOlder "3.7"; + disabled = python.pkgs.pythonOlder "3.7"; src = fetchFromGitHub { owner = "python-poetry"; @@ -59,7 +25,7 @@ buildPythonPackage rec { installShellFiles ]; - propagatedBuildInputs = [ + propagatedBuildInputs = with python.pkgs; [ cachecontrol cleo crashtest @@ -97,7 +63,7 @@ buildPythonPackage rec { --zsh <($out/bin/poetry completions zsh) \ ''; - checkInputs = [ + checkInputs = with python.pkgs; [ cachy deepdiff flatdict @@ -132,7 +98,7 @@ buildPythonPackage rec { "lock" # fs permission errors "test_builder_should_execute_build_scripts" - ] ++ lib.optionals (pythonAtLeast "3.10") [ + ] ++ lib.optionals (python.pythonAtLeast "3.10") [ # RuntimeError: 'auto_spec' might be a typo; use unsafe=True if this is intended "test_info_setup_complex_pep517_error" ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cc471b0bcbf8..3b8b9d7376f3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16363,7 +16363,7 @@ with pkgs; pew = callPackage ../development/tools/pew {}; - poetry = with python3.pkgs; toPythonApplication poetry; + poetry = callPackage ../tools/package-management/poetry { }; poetry2nix = callPackage ../development/tools/poetry2nix/poetry2nix { inherit pkgs lib; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index c444f6bb9d64..b7eb2cabec40 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -134,6 +134,7 @@ mapAliases ({ pathpy = path; # added 2022-04-12 pdfminer = pdfminer-six; # added 2022-05-25 pep257 = pydocstyle; # added 2022-04-12 + poetry = throw "poetry was promoted to a top-level attribute, use poetry-core to build Python packages"; # added 2023-01-09 poetry2conda = throw "poetry2conda was promoted to a top-level attribute"; # Added 2022-10-02 poster3 = throw "poster3 is unmaintained and source is no longer available"; # added 2023-05-29 postorius = throw "Please use pkgs.mailmanPackages.postorius"; # added 2022-04-29 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 216383e012b1..df4fe30b2111 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7300,8 +7300,6 @@ self: super: with self; { podcats = callPackage ../development/python-modules/podcats { }; - poetry = callPackage ../development/python-modules/poetry { }; - poetry-core = callPackage ../development/python-modules/poetry-core { }; poetry-dynamic-versioning = callPackage ../development/python-modules/poetry-dynamic-versioning { };