diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/package-management/pdm/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/package-management/pdm/default.nix | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/nixpkgs/pkgs/tools/package-management/pdm/default.nix b/nixpkgs/pkgs/tools/package-management/pdm/default.nix index 7458262b168a..01eda1ea0504 100644 --- a/nixpkgs/pkgs/tools/package-management/pdm/default.nix +++ b/nixpkgs/pkgs/tools/package-management/pdm/default.nix @@ -1,4 +1,4 @@ -{ lib, python3, fetchFromGitHub, fetchurl }: +{ lib, python3, fetchFromGitHub, fetchPypi }: let python = python3.override { # override resolvelib due to @@ -8,12 +8,12 @@ let # see here for more details: https://github.com/NixOS/nixpkgs/pull/155380/files#r786255738 packageOverrides = self: super: { resolvelib = super.resolvelib.overridePythonAttrs (attrs: rec { - version = "0.8.1"; + version = "1.0.1"; src = fetchFromGitHub { owner = "sarugaku"; repo = "resolvelib"; - rev = version; - sha256 = "sha256-QDHEdVET7HN2ZCKxNUMofabR+rxJy0erWhNQn94D7eI="; + rev = "/refs/tags/${version}"; + hash = "sha256-oxyPn3aFPOyx/2aP7Eg2ThtPbyzrFT1JzWqy6GqNbzM="; }; }); }; @@ -24,50 +24,51 @@ in with python.pkgs; buildPythonApplication rec { pname = "pdm"; - version = "1.14.0"; + version = "2.7.0"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-ZUbcuIRutSoHW5egCpwCKca2IZCgQsRAd72ueDzGySI="; + hash = "sha256-4dyu/neMFX/U1RuI0ZEBzdbONIHvdWyvpy1Gu5iMAcg="; }; - # this patch allows us to run additional tests that invoke pdm, which checks - # itself for an update on every invocation by default, drammatically slowing - # down test runs inside the sandbox - # - # the patch is necessary because the fixture is creating a project and - # doesn't appear to respect the settings in `$HOME`; possibly a bug upstream - patches = [ - ./check-update.patch + nativeBuildInputs = [ + pdm-backend ]; propagatedBuildInputs = [ blinker - click + cacheyou + certifi findpython installer packaging - pdm-pep517 - pep517 - pip platformdirs + pyproject-hooks python-dotenv - pythonfinder + requests-toolbelt resolvelib + rich shellingham - tomli tomlkit - ] ++ lib.optionals (pythonOlder "3.8") [ + unearth + virtualenv + ] + ++ cachecontrol.optional-dependencies.filecache + ++ lib.optionals (pythonOlder "3.11") [ + tomli + ] + ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata - typing-extensions ]; - checkInputs = [ + nativeCheckInputs = [ pytestCheckHook pytest-mock + pytest-rerunfailures pytest-xdist + pytest-httpserver ]; pytestFlagsArray = [ @@ -79,18 +80,18 @@ buildPythonApplication rec { ''; disabledTests = [ - # sys.executable and expected executable are different - "test_set_non_exist_python_path" + # fails to locate setuptools (maybe upstream bug) + "test_convert_setup_py_project" # pythonfinder isn't aware of nix's python infrastructure - "test_auto_isolate_site_packages" "test_use_wrapper_python" - "test_find_python_in_path" - # calls pip install and exits != 0 - "test_pre_and_post_hooks" + "test_use_invalid_wrapper_python" ]; + __darwinAllowLocalNetworking = true; + meta = with lib; { homepage = "https://pdm.fming.dev"; + changelog = "https://github.com/pdm-project/pdm/releases/tag/${version}"; description = "A modern Python package manager with PEP 582 support"; license = licenses.mit; maintainers = with maintainers; [ cpcloud ]; |