Merge pull request #233393 from dotlambda/poetry-1.5.0

poetry: 1.4.2 -> 1.5.1
This commit is contained in:
K900
2023-07-09 07:51:24 +03:00
committed by GitHub
5 changed files with 38 additions and 23 deletions
@@ -1,6 +1,7 @@
{ lib
, python3
, fetchFromGitHub
, fetchPypi
}:
let
@@ -22,37 +23,42 @@ let
self.lockfile
];
});
platformdirs = super.platformdirs.overridePythonAttrs (old: rec {
version = "2.6.2";
src = fetchFromGitHub {
owner = "platformdirs";
repo = "platformdirs";
rev = "refs/tags/${version}";
hash = "sha256-yGpDAwn8Kt6vF2K2zbAs8+fowhYQmvsm/87WJofuhME=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;
});
poetry-core = super.poetry-core.overridePythonAttrs (old: rec {
version = "1.5.2";
version = "1.6.1";
src = fetchFromGitHub {
owner = "python-poetry";
repo = "poetry-core";
rev = version;
hash = "sha256-GpZ0vMByHTu5kl7KrrFFK2aZMmkNO7xOEc8NI2H9k34=";
hash = "sha256-Gc22Y2T4uO39jiOqEUFeOfnVCbknuDjmzFPZgk2eY74=";
};
nativeCheckInputs = old.nativeCheckInputs ++ [
self.tomli-w
];
});
};
virtualenv = super.virtualenv.overridePythonAttrs (old: rec {
version = "20.23.1";
src = fetchPypi {
inherit (old) pname;
inherit version;
hash = "sha256-j/GaOMECHHQhSO3E+By0PX+MaBbS7eKrcq9bhMdJreE=";
};
nativeCheckInputs = old.nativeCheckInputs ++ [
self.time-machine
];
});
} // (plugins self);
};
plugins = with python.pkgs; {
plugins = ps: with ps; {
poetry-audit-plugin = callPackage ./plugins/poetry-audit-plugin.nix { };
poetry-plugin-export = callPackage ./plugins/poetry-plugin-export.nix { };
poetry-plugin-up = callPackage ./plugins/poetry-plugin-up.nix { };
};
# selector is a function mapping pythonPackages to a list of plugins
# e.g. poetry.withPlugins (ps: with ps; [ poetry-plugin-up ])
withPlugins = selector: let
selected = selector plugins;
selected = selector (plugins python.pkgs);
in python.pkgs.toPythonApplication (python.pkgs.poetry.overridePythonAttrs (old: {
propagatedBuildInputs = old.propagatedBuildInputs ++ selected;
@@ -65,8 +71,9 @@ let
rm $out/nix-support/propagated-build-inputs
'';
passthru = rec {
inherit plugins withPlugins python;
passthru = {
plugins = plugins python.pkgs;
inherit withPlugins python;
};
}));
in withPlugins (ps: [ ])
@@ -6,14 +6,14 @@
buildPythonPackage rec {
pname = "poetry-plugin-export";
version = "1.3.1";
version = "1.4.0";
format = "pyproject";
src = fetchFromGitHub {
owner = "python-poetry";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-zA5YHZ3/iVoNf2AKqkrKVDYJIoJh+FMwuoskWHutG5I=";
hash = "sha256-okI91Z9u5w7IHpPb9jL4Hb8+MkYJEF2qm0mqqCdyKbk=";
};
postPatch = ''
@@ -1,5 +1,6 @@
{ lib
, fetchFromGitHub
, fetchpatch
, buildPythonPackage
, poetry-core
, pytestCheckHook
@@ -19,6 +20,14 @@ buildPythonPackage rec {
hash = "sha256-QDfXgLkwh5rfyNZv0S7+cq6ubldXsbuCiTr6VYx8ZQs=";
};
patches = [
# https://github.com/MousaZeidBaker/poetry-plugin-up/pull/24
(fetchpatch {
url = "https://github.com/MousaZeidBaker/poetry-plugin-up/commit/31d78c547896efd27c2be0956a982638f32b07f8.patch";
hash = "sha256-CkZgX/ES+VkfxBofxWeparXNjsdP4qcQ1I32zaBBmWo=";
})
];
nativeBuildInputs = [
poetry-core
];
@@ -44,7 +44,7 @@
buildPythonPackage rec {
pname = "poetry";
version = "1.4.2";
version = "1.5.1";
format = "pyproject";
disabled = pythonOlder "3.7";
@@ -53,7 +53,7 @@ buildPythonPackage rec {
owner = "python-poetry";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-AiRQFZA5+M1niTzj1RO2lx0QFOMmSzpQo1gzauyTblg=";
hash = "sha256-1zqfGzSI5RDACSNcz0tLA4VKMFwE5uD/YqOkgpzg2nQ=";
};
nativeBuildInputs = [
@@ -123,6 +123,7 @@ buildPythonPackage rec {
'';
disabledTests = [
"test_installer_with_pypi_repository"
# touches network
"git"
"solver"
-2
View File
@@ -8103,8 +8103,6 @@ self: super: with self; {
poetry-dynamic-versioning = callPackage ../development/python-modules/poetry-dynamic-versioning { };
poetry-plugin-export = callPackage ../development/python-modules/poetry-plugin-export { };
poetry-semver = callPackage ../development/python-modules/poetry-semver { };
poezio = callPackage ../applications/networking/instant-messengers/poezio { };