diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/poetry/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/poetry/default.nix | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/poetry/default.nix b/nixpkgs/pkgs/development/python-modules/poetry/default.nix index 937a758b9c88..1519187d174b 100644 --- a/nixpkgs/pkgs/development/python-modules/poetry/default.nix +++ b/nixpkgs/pkgs/development/python-modules/poetry/default.nix @@ -7,14 +7,11 @@ , httpretty , importlib-metadata , intreehooks -, jsonschema , keyring , lockfile , pexpect , pkginfo -, pygments -, pyparsing -, pyrsistent +, poetry-core , pytestCheckHook , pytestcov , pytest-mock @@ -22,11 +19,12 @@ , requests-toolbelt , shellingham , tomlkit +, virtualenv }: buildPythonPackage rec { pname = "poetry"; - version = "1.0.10"; + version = "1.1.4"; format = "pyproject"; disabled = isPy27; @@ -34,19 +32,13 @@ buildPythonPackage rec { owner = "python-poetry"; repo = pname; rev = version; - sha256 = "00qfzjjs6clh93gfl1px3ma9km8qxl3f4z819nmyl58zc8ni3zyv"; + sha256 = "0lx3qpz5dad0is7ki5a4vxphvc8cm8fnv4bmrx226a6nvvaj6ahs"; }; postPatch = '' substituteInPlace pyproject.toml \ - --replace "pyrsistent = \"^0.14.2\"" "pyrsistent = \"^0.16.0\"" \ - --replace "requests-toolbelt = \"^0.8.0\"" "requests-toolbelt = \"^0.9.1\"" \ - --replace 'importlib-metadata = {version = "~1.1.3", python = "<3.8"}' \ - 'importlib-metadata = {version = ">=1.3,<2", python = "<3.8"}' \ - --replace "tomlkit = \"^0.5.11\"" "tomlkit = \"<2\"" \ - --replace "cleo = \"^0.7.6\"" "cleo = \"^0.8.0\"" \ - --replace "version = \"^20.0.1\", python = \"^3.5\"" "version = \"^21.0.0\", python = \"^3.5\"" \ - --replace "clikit = \"^0.4.2\"" "clikit = \"^0.6.2\"" + --replace 'importlib-metadata = {version = "^1.6.0", python = "<3.8"}' \ + 'importlib-metadata = {version = ">=1.6,<2", python = "<3.8"}' ''; nativeBuildInputs = [ intreehooks ]; @@ -57,17 +49,16 @@ buildPythonPackage rec { cleo clikit html5lib - jsonschema keyring lockfile pexpect pkginfo - pyparsing - pyrsistent + poetry-core requests requests-toolbelt shellingham tomlkit + virtualenv ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; postInstall = '' @@ -79,7 +70,7 @@ buildPythonPackage rec { "$out/bin/poetry" completions fish > "$out/share/fish/vendor_completions.d/poetry.fish" ''; - checkInputs = [ pytestCheckHook httpretty pytest-mock pygments pytestcov ]; + checkInputs = [ pytestCheckHook httpretty pytest-mock pytestcov ]; preCheck = "export HOME=$TMPDIR"; disabledTests = [ # touches network @@ -88,10 +79,23 @@ buildPythonPackage rec { "load" "vcs" "prereleases_if_they_are_compatible" + "test_executor" # requires git history to work correctly "default_with_excluded_data" # toml ordering has changed "lock" + # fs permission errors + "test_builder_should_execute_build_scripts" + ]; + + 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="; + }) ]; meta = with lib; { |