diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/poetry/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/poetry/default.nix | 110 |
1 files changed, 59 insertions, 51 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/poetry/default.nix b/nixpkgs/pkgs/development/python-modules/poetry/default.nix index 46be9bc92a2..937a758b9c8 100644 --- a/nixpkgs/pkgs/development/python-modules/poetry/default.nix +++ b/nixpkgs/pkgs/development/python-modules/poetry/default.nix @@ -1,74 +1,74 @@ -{ lib, buildPythonPackage, fetchPypi, callPackage -, isPy27 -, pythonOlder -, cleo -, requests -, cachy -, requests-toolbelt -, pyrsistent -, pyparsing +{ lib, buildPythonPackage, fetchFromGitHub, isPy27, pythonOlder, fetchpatch , cachecontrol -, pkginfo -, html5lib -, shellingham -, subprocess32 -, tomlkit -, typing -, pathlib2 -, virtualenv -, functools32 +, cachy +, cleo , clikit -, keyring -, pexpect +, html5lib +, httpretty , importlib-metadata -, pytest -, jsonschema , intreehooks +, jsonschema +, keyring , lockfile +, pexpect +, pkginfo +, pygments +, pyparsing +, pyrsistent +, pytestCheckHook +, pytestcov +, pytest-mock +, requests +, requests-toolbelt +, shellingham +, tomlkit }: -let - glob2 = callPackage ./glob2.nix { }; - -in buildPythonPackage rec { +buildPythonPackage rec { pname = "poetry"; - version = "1.0.5"; + version = "1.0.10"; format = "pyproject"; + disabled = isPy27; - src = fetchPypi { - inherit pname version; - sha256 = "02h387k0xssvv78yy82pcpknpq4w5ym2in1zl8cg9r5wljl5w6cf"; + src = fetchFromGitHub { + owner = "python-poetry"; + repo = pname; + rev = version; + sha256 = "00qfzjjs6clh93gfl1px3ma9km8qxl3f4z819nmyl58zc8ni3zyv"; }; postPatch = '' substituteInPlace pyproject.toml \ - --replace "pyrsistent = \"^0.14.2\"" "pyrsistent = \"^0.15.0\"" \ - --replace "requests-toolbelt = \"^0.8.0\"" "requests-toolbelt = \"^0.9.0\"" \ + --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"}' + '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\"" ''; nativeBuildInputs = [ intreehooks ]; propagatedBuildInputs = [ + cachecontrol + cachy cleo clikit - requests - cachy - requests-toolbelt + html5lib jsonschema - pyrsistent - pyparsing - cachecontrol + keyring + lockfile + pexpect pkginfo - html5lib + pyparsing + pyrsistent + requests + requests-toolbelt shellingham tomlkit - pexpect - keyring - lockfile - ] ++ lib.optionals isPy27 [ typing pathlib2 glob2 virtualenv functools32 subprocess32 ] - ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; + ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; postInstall = '' mkdir -p "$out/share/bash-completion/completions" @@ -79,12 +79,20 @@ in buildPythonPackage rec { "$out/bin/poetry" completions fish > "$out/share/fish/vendor_completions.d/poetry.fish" ''; - # No tests in Pypi tarball - doCheck = false; - checkInputs = [ pytest ]; - checkPhase = '' - pytest tests - ''; + checkInputs = [ pytestCheckHook httpretty pytest-mock pygments pytestcov ]; + preCheck = "export HOME=$TMPDIR"; + disabledTests = [ + # touches network + "git" + "solver" + "load" + "vcs" + "prereleases_if_they_are_compatible" + # requires git history to work correctly + "default_with_excluded_data" + # toml ordering has changed + "lock" + ]; meta = with lib; { homepage = "https://python-poetry.org/"; |