python3Packages.poetry: 1.1.14 -> 1.2.0

https://github.com/python-poetry/poetry/releases/tag/1.2.0
This commit is contained in:
Martin Weinelt
2022-09-14 15:21:50 +02:00
parent bb1864a88a
commit f2a71e956b
@@ -1,99 +1,104 @@
{ lib
, backports-cached-property
, buildPythonPackage
, cachecontrol
, cachy
, cleo
, clikit
, crashtest
, dataclasses
, entrypoints
, deepdiff
, dulwich
, fetchFromGitHub
, fetchpatch
, 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
, tomlkit
, urllib3
, virtualenv
, xattr
}:
buildPythonPackage rec {
pname = "poetry";
version = "1.1.14";
version = "1.2.0";
format = "pyproject";
disabled = pythonOlder "3.6";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "python-poetry";
repo = pname;
rev = version;
sha256 = "sha256-n/GZOUoIMxWlULDqOe59Gt7Hz/+Mc4QcZT+1+HtQovs=";
rev = "refs/tags/${version}";
hash = "sha256-+Nsg7oPh9tAHEKt1R9C+nY9UPy+9vbf/+A6vQWgTi+4=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'importlib-metadata = {version = "^1.6.0", python = "<3.8"}' \
'importlib-metadata = {version = ">=1.6", python = "<3.8"}' \
--replace 'version = "^21.2.0"' 'version = ">=21.2"' \
--replace 'packaging = "^20.4"' 'packaging = "*"'
'';
nativeBuildInputs = [
intreehooks
installShellFiles
];
propagatedBuildInputs = [
cachecontrol
cachy
cleo
clikit
crashtest
entrypoints
dulwich
html5lib
jsonschema
keyring
lockfile
packaging
pexpect
pkginfo
platformdirs
poetry-core
poetry-plugin-export
requests
requests-toolbelt
shellingham
tomlkit
virtualenv
] ++ lib.optionals (pythonOlder "3.7") [
dataclasses
] ++ lib.optionals (pythonOlder "3.8") [
] ++ lib.optionals (stdenv.isDarwin) [
xattr
] ++ lib.optionals (pythonOlder "3.10") [
importlib-metadata
];
] ++ lib.optionals (pythonOlder "3.8") [
backports-cached-property
] ++ cachecontrol.optional-dependencies.filecache;
postInstall = ''
mkdir -p "$out/share/bash-completion/completions"
"$out/bin/poetry" completions bash > "$out/share/bash-completion/completions/poetry"
mkdir -p "$out/share/zsh/vendor-completions"
"$out/bin/poetry" completions zsh > "$out/share/zsh/vendor-completions/_poetry"
mkdir -p "$out/share/fish/vendor_completions.d"
"$out/bin/poetry" completions fish > "$out/share/fish/vendor_completions.d/poetry.fish"
installShellCompletion --cmd poetry \
--bash <($out/bin/poetry completions bash) \
--fish <($out/bin/poetry completions fish) \
--zsh <($out/bin/poetry completions zsh) \
'';
checkInputs = [
deepdiff
flatdict
pytestCheckHook
httpretty
pytest-mock
pytest-xdist
];
preCheck = ''
@@ -119,16 +124,6 @@ buildPythonPackage rec {
"test_info_setup_complex_pep517_error"
];
patches = [
# The following patch addresses a minor incompatibility with
# pytest-mock. This is addressed upstream in
# https://github.com/python-poetry/poetry/pull/3457
(fetchpatch {
url = "https://github.com/python-poetry/poetry/commit/8ddceb7c52b3b1f35412479707fa790e5d60e691.diff";
sha256 = "yHjFb9xJBLFOqkOZaJolKviTdtST9PMFwH9n8ud2Y+U=";
})
];
# Allow for package to use pep420's native namespaces
pythonNamespaces = [
"poetry"