Skip to content

Commit

Permalink
Merge pull request #333603 from natsukium/pdm/update
Browse files Browse the repository at this point in the history
pdm: 2.15.4 -> 2.17.3
  • Loading branch information
natsukium authored Aug 10, 2024
2 parents c5979b4 + 909e5ae commit 5165252
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 2 deletions.
57 changes: 57 additions & 0 deletions pkgs/development/python-modules/pdm-build-locked/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
pdm-backend,
tomli,
build,
hatchling,
pkginfo,
pytestCheckHook,
}:

buildPythonPackage rec {
pname = "pdm-build-locked";
version = "0.3.3";
pyproject = true;

src = fetchFromGitHub {
owner = "pdm-project";
repo = "pdm-build-locked";
rev = "refs/tags/${version}";
hash = "sha256-tgLC1tUgmyX7QvlLpNb/SMQRTDZ+DNFV3o0JELAZEeo=";
};

postPatch = ''
substituteInPlace tests/conftest.py \
--replace-fail '"pdm.pytest"' ""
sed -i "/addopts/d" pyproject.toml
'';

build-system = [ pdm-backend ];

dependencies = lib.optionals (pythonOlder "3.11") [ tomli ];

pythonImportsCheck = [ "pdm_build_locked" ];

nativeCheckInputs = [
build
hatchling
pkginfo
pytestCheckHook
];

disabledTestPaths = [
# circular import of pdm
"tests/unit/test_build_command.py"
];

meta = {
description = "Pdm-build-locked is a pdm plugin to publish locked dependencies as optional-dependencies";
homepage = "https://github.com/pdm-project/pdm-build-locked";
changelog = "https://github.com/pdm-project/pdm-build-locked/releases/tag/${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ natsukium ];
};
}
8 changes: 6 additions & 2 deletions pkgs/tools/package-management/pdm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
with python3.pkgs;
buildPythonApplication rec {
pname = "pdm";
version = "2.15.4";
version = "2.17.3";
pyproject = true;

disabled = pythonOlder "3.8";

src = fetchPypi {
inherit pname version;
hash = "sha256-WOIlhQVn3K3OQkGNtGOJlt8rE3jNCDDNSK/aG0VdnHI=";
hash = "sha256-9JIg8iXscSWMv3FIsUp2yurGEnRb7atn+QYjmOpWp6U=";
};

nativeBuildInputs = [
Expand All @@ -27,6 +27,7 @@ buildPythonApplication rec {

build-system = [
pdm-backend
pdm-build-locked
];

dependencies = [
Expand Down Expand Up @@ -102,11 +103,14 @@ buildPythonApplication rec {
"test_convert_setup_py_project"
# pythonfinder isn't aware of nix's python infrastructure
"test_use_wrapper_python"
"test_build_with_no_isolation"
"test_run_script_with_inline_metadata"

# touches the network
"test_find_candidates_from_find_links"
"test_lock_all_with_excluded_groups"
"test_find_interpreters_with_PDM_IGNORE_ACTIVE_VENV"
"test_build_distributions"
];

__darwinAllowLocalNetworking = true;
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9898,6 +9898,8 @@ self: super: with self; {

pdm-backend = callPackage ../development/python-modules/pdm-backend { };

pdm-build-locked = callPackage ../development/python-modules/pdm-build-locked { };

pdm-pep517 = callPackage ../development/python-modules/pdm-pep517 { };

pdoc = callPackage ../development/python-modules/pdoc { };
Expand Down

0 comments on commit 5165252

Please sign in to comment.