Merge pull request #115073 from tweag/poetry2nix-1_16_0

poetry2nix: 1.15.5 -> 1.16.0
This commit is contained in:
adisbladis 2021-03-04 16:59:34 +02:00 committed by GitHub
commit f0f69eda7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 396 additions and 257 deletions

View file

@ -4,6 +4,9 @@
, poetryLib ? import ./lib.nix { inherit lib pkgs; stdenv = pkgs.stdenv; }
}:
let
# Poetry2nix version
version = "1.16.0";
inherit (poetryLib) isCompatible readTOML moduleName;
/* The default list of poetry2nix override overlays */
@ -70,8 +73,7 @@ let
in
lib.makeScope pkgs.newScope (self: {
# Poetry2nix version
version = "1.15.5";
inherit version;
/* Returns a package of editable sources whose changes will be available without needing to restart the
nix-shell.

View file

@ -157,7 +157,7 @@ let
missingBuildBackendError = "No build-system.build-backend section in pyproject.toml. "
+ "Add such a section as described in https://python-poetry.org/docs/pyproject/#poetry-and-pep-517";
requires = lib.attrByPath [ "build-system" "requires" ] (throw missingBuildBackendError) pyProject;
requiredPkgs = builtins.map (n: lib.elemAt (builtins.match "([^!=<>~\[]+).*" n) 0) requires;
requiredPkgs = builtins.map (n: lib.elemAt (builtins.match "([^!=<>~[]+).*" n) 0) requires;
in
builtins.map (drvAttr: pythonPackages.${drvAttr} or (throw "unsupported build system requirement ${drvAttr}")) requiredPkgs;

View file

@ -250,6 +250,15 @@ self: super:
}
);
gdal = super.gdal.overridePythonAttrs (
old: {
preBuild = (old.preBuild or "") + ''
substituteInPlace setup.cfg \
--replace "../../apps/gdal-config" '${pkgs.gdal}/bin/gdal-config'
'';
}
);
grandalf = super.grandalf.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.pytest-runner ];
@ -360,9 +369,13 @@ self: super:
}
);
# disable the removal of pyproject.toml, required because of setuptools_scm
jaraco-functools = super.jaraco-functools.overridePythonAttrs (
old: {
# required for the extra "toml" dependency in setuptools_scm[toml]
buildInputs = (old.buildInputs or [ ]) ++ [
self.toml
];
# disable the removal of pyproject.toml, required because of setuptools_scm
dontPreferSetupPy = true;
}
);
@ -378,6 +391,15 @@ self: super:
}
);
jsondiff = super.jsondiff.overridePythonAttrs (
old: {
preBuild = (old.preBuild or "") + ''
substituteInPlace setup.py \
--replace "'jsondiff=jsondiff.cli:main_deprecated'," ""
'';
}
);
jsonpickle = super.jsonpickle.overridePythonAttrs (
old: {
dontPreferSetupPy = true;
@ -558,6 +580,13 @@ self: super:
buildInputs = oa.buildInputs ++ [ self.pbr ];
});
moto = super.moto.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++
[ self.sshpubkeys ];
}
);
mpi4py = super.mpi4py.overridePythonAttrs (
old:
let
@ -674,6 +703,12 @@ self: super:
}
);
pdal = super.pdal.overridePythonAttrs (
old: {
PDAL_CONFIG = "${pkgs.pdal}/bin/pdal-config";
}
);
peewee = super.peewee.overridePythonAttrs (
old:
let
@ -733,9 +768,13 @@ self: super:
'';
});
# disable the removal of pyproject.toml, required because of setuptools_scm
portend = super.portend.overridePythonAttrs (
old: {
# required for the extra "toml" dependency in setuptools_scm[toml]
buildInputs = (old.buildInputs or [ ]) ++ [
self.toml
];
# disable the removal of pyproject.toml, required because of setuptools_scm
dontPreferSetupPy = true;
}
);
@ -920,6 +959,16 @@ self: super:
}
);
pyproj = super.pyproj.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++
[ self.cython ];
PROJ_DIR = "${pkgs.proj}";
PROJ_LIBDIR = "${pkgs.proj}/lib";
PROJ_INCDIR = "${pkgs.proj.dev}/include";
}
);
python-bugzilla = super.python-bugzilla.overridePythonAttrs (
old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
@ -952,6 +1001,8 @@ self: super:
old: {
format = "other";
dontWrapQtApps = true;
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
pkgs.pkg-config
pkgs.qt5.qmake
@ -1071,12 +1122,9 @@ self: super:
pytest-runner = super.pytest-runner or super.pytestrunner;
python-jose = super.python-jose.overridePythonAttrs (
pytest-pylint = super.pytest-pylint.overridePythonAttrs (
old: {
postPath = ''
substituteInPlace setup.py --replace "'pytest-runner'," ""
substituteInPlace setup.py --replace "'pytest-runner'" ""
'';
buildInputs = [ self.pytest-runner ];
}
);
@ -1101,6 +1149,11 @@ self: super:
'';
});
python-jose = super.python-jose.overridePythonAttrs (
old: {
buildInputs = [ self.pytest-runner ];
}
);
ffmpeg-python = super.ffmpeg-python.overridePythonAttrs (
old: {
@ -1233,9 +1286,13 @@ self: super:
}
);
# disable the removal of pyproject.toml, required because of setuptools_scm
tempora = super.tempora.overridePythonAttrs (
old: {
# required for the extra "toml" dependency in setuptools_scm[toml]
buildInputs = (old.buildInputs or [ ]) ++ [
self.toml
];
# disable the removal of pyproject.toml, required because of setuptools_scm
dontPreferSetupPy = true;
}
);

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
[tool.poetry]
name = "poetry"
version = "1.1.4"
version = "1.1.5"
description = "Python dependency management and packaging made easy."
authors = [
"Sébastien Eustace <sebastien@eustace.io>"
@ -24,7 +24,7 @@ classifiers = [
[tool.poetry.dependencies]
python = "~2.7 || ^3.5"
poetry-core = "^1.0.0"
poetry-core = "~1.0.2"
cleo = "^0.8.1"
clikit = "^0.6.2"
crashtest = { version = "^0.3.0", python = "^3.6" }
@ -71,6 +71,10 @@ pre-commit = { version = "^2.6", python = "^3.6.1" }
tox = "^3.0"
pytest-sugar = "^0.9.2"
httpretty = "^0.9.6"
# We need to restrict the version of urllib3 to avoid
# httpretty breaking. This is fixed in httpretty >= 1.0.3
# but it's not compatible with Python 2.7 and 3.5.
urllib3 = "~1.25.10"
[tool.poetry.scripts]
poetry = "poetry.console:main"

View file

@ -1,7 +1,7 @@
{
"owner": "python-poetry",
"repo": "poetry",
"rev": "8312e3f2dbfa126cd311c666fea30656941e1bd3",
"sha256": "0lx3qpz5dad0is7ki5a4vxphvc8cm8fnv4bmrx226a6nvvaj6ahs",
"rev": "a9704149394151f4d0d28cd5d8ee2283c7d10787",
"sha256": "0bv6irpscpak6pldkzrx4j12dqnpfz5h8fy5lliglizv0avh60hf",
"fetchSubmodules": true
}

View file

@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p curl nix-prefetch-github
#! nix-shell -i bash -p curl nix-prefetch-github jq
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

View file

@ -3,7 +3,7 @@ let
inherit (builtins) elemAt match;
operators =
let
matchWildCard = s: match "([^\*])(\.[\*])" s;
matchWildCard = s: match "([^*])(\\.[*])" s;
mkComparison = ret: version: v: builtins.compareVersions version v == ret;
mkIdxComparison = idx: version: v:
let
@ -52,8 +52,8 @@ let
#
};
re = {
operators = "([=><!~\^]+)";
version = "([0-9\.\*x]+)";
operators = "([=><!~^]+)";
version = "([0-9.*x]+)";
};
parseConstraint = constraint:
let