pythonPackages.poetry: 1.0.5 -> 1.0.9
Disables Python2 support and enables tests. Co-Authored-By: Jonathan Ringer <jonringer117@gmail.com>
This commit is contained in:
parent
3bfcfa9a76
commit
7fae3f8534
@ -1,74 +1,74 @@
|
|||||||
{ lib, buildPythonPackage, fetchPypi, callPackage
|
{ lib, buildPythonPackage, fetchFromGitHub, isPy27, pythonOlder
|
||||||
, isPy27
|
|
||||||
, pythonOlder
|
|
||||||
, cleo
|
|
||||||
, requests
|
|
||||||
, cachy
|
|
||||||
, requests-toolbelt
|
|
||||||
, pyrsistent
|
|
||||||
, pyparsing
|
|
||||||
, cachecontrol
|
, cachecontrol
|
||||||
, pkginfo
|
, cachy
|
||||||
, html5lib
|
, cleo
|
||||||
, shellingham
|
|
||||||
, subprocess32
|
|
||||||
, tomlkit
|
|
||||||
, typing
|
|
||||||
, pathlib2
|
|
||||||
, virtualenv
|
|
||||||
, functools32
|
|
||||||
, clikit
|
, clikit
|
||||||
, keyring
|
, html5lib
|
||||||
, pexpect
|
, httpretty
|
||||||
, importlib-metadata
|
, importlib-metadata
|
||||||
, pytest
|
|
||||||
, jsonschema
|
|
||||||
, intreehooks
|
, intreehooks
|
||||||
|
, jsonschema
|
||||||
|
, keyring
|
||||||
, lockfile
|
, lockfile
|
||||||
|
, pexpect
|
||||||
|
, pkginfo
|
||||||
|
, pygments
|
||||||
|
, pyparsing
|
||||||
|
, pyrsistent
|
||||||
|
, pytestCheckHook
|
||||||
|
, pytestcov
|
||||||
|
, pytest-mock
|
||||||
|
, requests
|
||||||
|
, requests-toolbelt
|
||||||
|
, shellingham
|
||||||
|
, tomlkit
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
buildPythonPackage rec {
|
||||||
glob2 = callPackage ./glob2.nix { };
|
|
||||||
|
|
||||||
in buildPythonPackage rec {
|
|
||||||
pname = "poetry";
|
pname = "poetry";
|
||||||
version = "1.0.5";
|
version = "1.0.9";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
disabled = isPy27;
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchFromGitHub {
|
||||||
inherit pname version;
|
owner = "python-poetry";
|
||||||
sha256 = "02h387k0xssvv78yy82pcpknpq4w5ym2in1zl8cg9r5wljl5w6cf";
|
repo = pname;
|
||||||
|
rev = version;
|
||||||
|
sha256 = "0gi1li55rim60hf1gdpgpx84zlkaj0wv12wbv7dib9malhfj3pnz";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace pyproject.toml \
|
substituteInPlace pyproject.toml \
|
||||||
--replace "pyrsistent = \"^0.14.2\"" "pyrsistent = \"^0.15.0\"" \
|
--replace "pyrsistent = \"^0.14.2\"" "pyrsistent = \"^0.16.0\"" \
|
||||||
--replace "requests-toolbelt = \"^0.8.0\"" "requests-toolbelt = \"^0.9.0\"" \
|
--replace "requests-toolbelt = \"^0.8.0\"" "requests-toolbelt = \"^0.9.1\"" \
|
||||||
--replace 'importlib-metadata = {version = "~1.1.3", python = "<3.8"}' \
|
--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 = \"^0.6.0\"" \
|
||||||
|
--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 ];
|
nativeBuildInputs = [ intreehooks ];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
cachecontrol
|
||||||
|
cachy
|
||||||
cleo
|
cleo
|
||||||
clikit
|
clikit
|
||||||
requests
|
|
||||||
cachy
|
|
||||||
requests-toolbelt
|
|
||||||
jsonschema
|
|
||||||
pyrsistent
|
|
||||||
pyparsing
|
|
||||||
cachecontrol
|
|
||||||
pkginfo
|
|
||||||
html5lib
|
html5lib
|
||||||
shellingham
|
jsonschema
|
||||||
tomlkit
|
|
||||||
pexpect
|
|
||||||
keyring
|
keyring
|
||||||
lockfile
|
lockfile
|
||||||
] ++ lib.optionals isPy27 [ typing pathlib2 glob2 virtualenv functools32 subprocess32 ]
|
pexpect
|
||||||
++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
|
pkginfo
|
||||||
|
pyparsing
|
||||||
|
pyrsistent
|
||||||
|
requests
|
||||||
|
requests-toolbelt
|
||||||
|
shellingham
|
||||||
|
tomlkit
|
||||||
|
] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p "$out/share/bash-completion/completions"
|
mkdir -p "$out/share/bash-completion/completions"
|
||||||
@ -79,12 +79,18 @@ in buildPythonPackage rec {
|
|||||||
"$out/bin/poetry" completions fish > "$out/share/fish/vendor_completions.d/poetry.fish"
|
"$out/bin/poetry" completions fish > "$out/share/fish/vendor_completions.d/poetry.fish"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# No tests in Pypi tarball
|
checkInputs = [ pytestCheckHook httpretty pytest-mock pygments pytestcov ];
|
||||||
doCheck = false;
|
preCheck = "export HOME=$TMPDIR";
|
||||||
checkInputs = [ pytest ];
|
disabledTests = [
|
||||||
checkPhase = ''
|
# touches network
|
||||||
pytest tests
|
"git"
|
||||||
'';
|
"solver"
|
||||||
|
"load"
|
||||||
|
"vcs"
|
||||||
|
"prereleases_if_they_are_compatible"
|
||||||
|
# requires git history to work correctly
|
||||||
|
"default_with_excluded_data"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://python-poetry.org/";
|
homepage = "https://python-poetry.org/";
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
{ buildPythonPackage, fetchPypi }:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "glob2";
|
|
||||||
version = "0.6";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "1miyz0pjyji4gqrzl04xsxcylk3h2v9fvi7hsg221y11zy3adc7m";
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user