Merge pull request #89848 from adisbladis/poetry-1_0_8
poetry: 1.0.5 -> 1.0.8
This commit is contained in:
commit
0ff9f5e1f6
|
@ -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 ];
|
||||
};
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"owner": "python-poetry",
|
||||
"repo": "poetry",
|
||||
"rev": "754dbf80dc022b89974288cff10b40ab2f1c2697",
|
||||
"sha256": "1khjx598n222fhzvsxsc6cq4m2i8rss1k1whxw9k03kxi4dx6x5g"
|
||||
}
|
|
@ -7,7 +7,7 @@ let
|
|||
inherit (poetryLib) isCompatible readTOML moduleName;
|
||||
|
||||
# Poetry2nix version
|
||||
version = "1.8.0";
|
||||
version = "1.9.2";
|
||||
|
||||
/* The default list of poetry2nix override overlays */
|
||||
defaultPoetryOverrides = (import ./overrides.nix { inherit pkgs lib; });
|
||||
|
|
|
@ -146,7 +146,7 @@ let
|
|||
else
|
||||
pkgs.fetchurl {
|
||||
url = predictURLFromPypi { inherit pname file hash kind; };
|
||||
sha256 = builtins.elemAt (builtins.match "sha256:(.*)" hash) 0; # nix 2.0 backwards compatibility.
|
||||
inherit hash;
|
||||
}
|
||||
);
|
||||
getBuildSystemPkgs =
|
||||
|
|
|
@ -6,6 +6,12 @@
|
|||
self: super:
|
||||
|
||||
{
|
||||
automat = super.automat.overridePythonAttrs (
|
||||
old: rec {
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.m2r ];
|
||||
}
|
||||
);
|
||||
|
||||
astroid = super.astroid.overridePythonAttrs (
|
||||
old: rec {
|
||||
buildInputs = old.buildInputs ++ [ self.pytest-runner ];
|
||||
|
@ -211,6 +217,12 @@ self: super:
|
|||
}
|
||||
);
|
||||
|
||||
intreehooks = super.intreehooks.overridePythonAttrs (
|
||||
old: {
|
||||
doCheck = false;
|
||||
}
|
||||
);
|
||||
|
||||
isort = super.isort.overridePythonAttrs (
|
||||
old: {
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.setuptools ];
|
||||
|
@ -398,6 +410,12 @@ self: super:
|
|||
}
|
||||
);
|
||||
|
||||
parsel = super.parsel.overridePythonAttrs (
|
||||
old: rec {
|
||||
nativeBuildInputs = old.nativeBuildInputs ++ [ self.pytest-runner ];
|
||||
}
|
||||
);
|
||||
|
||||
peewee = super.peewee.overridePythonAttrs (
|
||||
old:
|
||||
let
|
||||
|
@ -517,6 +535,46 @@ self: super:
|
|||
}
|
||||
);
|
||||
|
||||
pygame = super.pygame.overridePythonAttrs (
|
||||
old: rec {
|
||||
nativeBuildInputs = [
|
||||
pkgs.pkg-config
|
||||
pkgs.SDL
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
pkgs.SDL
|
||||
pkgs.SDL_image
|
||||
pkgs.SDL_mixer
|
||||
pkgs.SDL_ttf
|
||||
pkgs.libpng
|
||||
pkgs.libjpeg
|
||||
pkgs.portmidi
|
||||
pkgs.xorg.libX11
|
||||
pkgs.freetype
|
||||
];
|
||||
|
||||
# Tests fail because of no audio device and display.
|
||||
doCheck = false;
|
||||
preConfigure = ''
|
||||
sed \
|
||||
-e "s/origincdirs = .*/origincdirs = []/" \
|
||||
-e "s/origlibdirs = .*/origlibdirs = []/" \
|
||||
-e "/'\/lib\/i386-linux-gnu', '\/lib\/x86_64-linux-gnu']/d" \
|
||||
-e "/\/include\/smpeg/d" \
|
||||
-i buildconfig/config_unix.py
|
||||
${lib.concatMapStrings (dep: ''
|
||||
sed \
|
||||
-e "/origincdirs =/a\ origincdirs += ['${lib.getDev dep}/include']" \
|
||||
-e "/origlibdirs =/a\ origlibdirs += ['${lib.getLib dep}/lib']" \
|
||||
-i buildconfig/config_unix.py
|
||||
'') buildInputs
|
||||
}
|
||||
LOCALBASE=/ ${self.python.interpreter} buildconfig/config.py
|
||||
'';
|
||||
}
|
||||
);
|
||||
|
||||
pygobject = super.pygobject.overridePythonAttrs (
|
||||
old: {
|
||||
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.pkgconfig ];
|
||||
|
@ -537,6 +595,12 @@ self: super:
|
|||
}
|
||||
);
|
||||
|
||||
pytoml = super.pytoml.overridePythonAttrs (
|
||||
old: {
|
||||
doCheck = false;
|
||||
}
|
||||
);
|
||||
|
||||
pyqt5 =
|
||||
let
|
||||
drv = super.pyqt5;
|
||||
|
|
|
@ -20,7 +20,9 @@ let
|
|||
#
|
||||
toWheelAttrs = str:
|
||||
let
|
||||
entries = splitString "-" str;
|
||||
entries' = splitString "-" str;
|
||||
# Hack: Remove version "suffixes" like 2.11.4-1
|
||||
entries = builtins.filter (x: builtins.match "[0-9]" x == null) entries';
|
||||
p = removeSuffix ".whl" (builtins.elemAt entries 4);
|
||||
in
|
||||
{
|
||||
|
@ -60,7 +62,12 @@ let
|
|||
selectWheel = files:
|
||||
let
|
||||
filesWithoutSources = (builtins.filter (x: hasSuffix ".whl" x.file) files);
|
||||
isPyAbiCompatible = pyabi: x: x == "none" || pyabi == x;
|
||||
isPyAbiCompatible = pyabi: x: x == "none" || lib.hasPrefix pyabi x || (
|
||||
# The CPython stable ABI is abi3 as in the shared library suffix.
|
||||
python.passthru.implementation == "cpython" &&
|
||||
builtins.elemAt (lib.splitString "." python.version) 0 == "3" &&
|
||||
x == "abi3"
|
||||
);
|
||||
withPython = ver: abi: x: (isPyVersionCompatible ver x.pyVer) && (isPyAbiCompatible abi x.abi);
|
||||
withPlatform =
|
||||
if isLinux
|
||||
|
|
|
@ -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 ];
|
||||
};
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -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
|
||||
)/
|
||||
'''
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"owner": "python-poetry",
|
||||
"repo": "poetry",
|
||||
"rev": "6f9d6b0e1b7b1d3a7d7b2ca3478ad2cb0a7188e2",
|
||||
"sha256": "1g9kcp3zlfk3f063hz1av9jj7s60pwxzqgj59w21sd5fx7yzdsaf"
|
||||
}
|
|
@ -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'
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue