poetry: 1.0.5 -> 1.0.8

This commit is contained in:
adisbladis 2020-06-08 23:56:30 +02:00
parent 25b9f3b3e0
commit 423f85422f
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7
9 changed files with 494 additions and 229 deletions

View file

@ -1,33 +0,0 @@
{ lib, poetry2nix, python, fetchFromGitHub, runtimeShell }:
poetry2nix.mkPoetryApplication {
inherit python;
pyproject = ./pyproject.toml;
poetrylock = ./poetry.lock;
src = fetchFromGitHub (lib.importJSON ./src.json);
# "Vendor" dependencies (for build-system support)
postPatch = ''
for path in ''${PYTHONPATH//:/ }; do
echo "sys.path.insert(0, \"$path\")" >> poetry/__init__.py
done
'';
# Propagating dependencies leads to issues downstream
# We've already patched poetry to prefer "vendored" dependencies
postFixup = ''
rm $out/nix-support/propagated-build-inputs
'';
# Fails because of impurities (network, git etc etc)
doCheck = false;
meta = with lib; {
platforms = platforms.all;
maintainers = with maintainers; [ adisbladis jakewaksbaum ];
};
}

View file

@ -1,6 +0,0 @@
{
"owner": "python-poetry",
"repo": "poetry",
"rev": "754dbf80dc022b89974288cff10b40ab2f1c2697",
"sha256": "1khjx598n222fhzvsxsc6cq4m2i8rss1k1whxw9k03kxi4dx6x5g"
}

View file

@ -0,0 +1,41 @@
{ lib, poetry2nix, python, fetchFromGitHub }:
poetry2nix.mkPoetryApplication {
inherit python;
projectDir = ./.;
src = fetchFromGitHub (lib.importJSON ./src.json);
# "Vendor" dependencies (for build-system support)
postPatch = ''
for path in ''${PYTHONPATH//:/ }; do echo $path; done | uniq | while read path; do
echo "sys.path.insert(0, \"$path\")" >> poetry/__init__.py
done
'';
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"
'';
# Propagating dependencies leads to issues downstream
# We've already patched poetry to prefer "vendored" dependencies
postFixup = ''
rm $out/nix-support/propagated-build-inputs
'';
# Fails because of impurities (network, git etc etc)
doCheck = false;
meta = with lib; {
inherit (python.meta) platforms;
maintainers = with maintainers; [ adisbladis jakewaksbaum ];
};
}

View file

@ -1,6 +1,6 @@
[tool.poetry]
name = "poetry"
version = "1.0.5"
version = "1.0.8"
description = "Python dependency management and packaging made easy."
authors = [
"Sébastien Eustace <sebastien@eustace.io>"
@ -58,7 +58,10 @@ subprocess32 = { version = "^3.5", python = "~2.7 || ~3.4" }
importlib-metadata = {version = "~1.1.3", python = "<3.8"}
[tool.poetry.dev-dependencies]
pytest = "^4.1"
pytest = [
{version = "^4.1", python = "<3.5"},
{version = "^5.4.3", python = ">=3.5"}
]
pytest-cov = "^2.5"
mkdocs = { version = "^1.0", python = "~2.7.9 || ^3.4" }
pymdown-extensions = "^6.0"
@ -116,3 +119,23 @@ known_third_party = [
"shellingham",
"tomlkit",
]
[tool.black]
line-length = 88
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| tests/.*/setup.py
)/
'''

View file

@ -0,0 +1,6 @@
{
"owner": "python-poetry",
"repo": "poetry",
"rev": "6f9d6b0e1b7b1d3a7d7b2ca3478ad2cb0a7188e2",
"sha256": "1g9kcp3zlfk3f063hz1av9jj7s60pwxzqgj59w21sd5fx7yzdsaf"
}

View file

@ -4,6 +4,6 @@
rev=$(curl -s https://api.github.com/repos/python-poetry/poetry/releases/latest | jq -r '.name')
nix-prefetch-github --rev "$rev" python-poetry poetry > src.json
src=$(nix-build --expr 'with import ../../../../. {}; fetchFromGitHub (lib.importJSON ./src.json)')
src=$(nix-build --no-out-link --expr 'with import <nixpkgs> {}; fetchFromGitHub (lib.importJSON ./src.json)')
cp $src/pyproject.toml $src/poetry.lock .
nix-build --show-trace --no-out-link ../../../../. -A poetry
nix-build --expr '(import <nixpkgs> { overlays = [ (import ../../overlay.nix) ]; }).poetry'

View file

@ -15,7 +15,7 @@ mv poetry2nix-master/* .
mkdir build
cp *.* build/
cp -r hooks bin build/
cp -r pkgs hooks bin build/
rm build/shell.nix build/generate.py build/overlay.nix build/flake.nix
cat > build/README.md << EOF

View file

@ -9705,7 +9705,7 @@ in
pew = callPackage ../development/tools/pew {};
poetry = callPackage ../development/tools/poetry {
poetry = callPackage ../development/tools/poetry2nix/poetry2nix/pkgs/poetry {
python = python3;
};
poetry2nix = callPackage ../development/tools/poetry2nix/poetry2nix {