poetry2nix: 1.38.0 -> 1.39.1

This commit is contained in:
adisbladis 2022-12-10 22:08:48 +13:00
parent 9928825c02
commit 8493ebc89c
8 changed files with 579 additions and 403 deletions

View file

@ -5,7 +5,7 @@
}:
let
# Poetry2nix version
version = "1.38.0";
version = "1.39.1";
inherit (poetryLib) isCompatible readTOML normalizePackageName normalizePackageSet;

View file

@ -165,6 +165,7 @@ pythonPackages.callPackage
(
builtins.fetchGit ({
inherit (source) url;
submodules = true;
rev = source.resolved_reference or source.reference;
ref = sourceSpec.branch or (if sourceSpec ? tag then "refs/tags/${sourceSpec.tag}" else "HEAD");
} // (

View file

@ -2938,6 +2938,9 @@
"cometblue-lite": [
"setuptools"
],
"comm": [
"hatchling"
],
"commandparse": [
"setuptools"
],
@ -9892,7 +9895,8 @@
"setuptools"
],
"packaging": [
"setuptools"
"setuptools",
"flit-core"
],
"packbits": [
"setuptools"
@ -14254,7 +14258,9 @@
"setuptools"
],
"rapidfuzz": [
"setuptools"
"setuptools",
"packaging",
"scikit-build"
],
"rapidfuzz-capi": [
"setuptools"
@ -14949,7 +14955,8 @@
"setuptools-scm"
],
"scikit-image": [
"cython"
"cython",
"setuptools"
],
"scikit-learn": [
"cython",
@ -16893,6 +16900,9 @@
"trimesh": [
"setuptools"
],
"trino": [
"setuptools"
],
"trio": [
"setuptools"
],
@ -16905,6 +16915,10 @@
"troposphere": [
"setuptools"
],
"trove-classifiers": [
"setuptools",
"calver"
],
"trueskill": [
"setuptools"
],

View file

@ -390,7 +390,7 @@ lib.composeManyExtensions [
scrypto =
if isWheel then
(
super.cryptography.override { preferWheel = true; }
super.cryptography.overridePythonAttrs { preferWheel = true; }
) else super.cryptography;
in
scrypto.overridePythonAttrs
@ -1324,9 +1324,10 @@ lib.composeManyExtensions [
open3d = super.open3d.overridePythonAttrs (old: {
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.ipywidgets ];
buildInputs = (old.buildInputs or [ ]) ++ [
pkgs.udev
pkgs.libusb1
] ++ (if lib.versionAtLeast super.open3d.version "0.16.0" then [
] ++ lib.optionals stdenv.isLinux [
pkgs.udev
] ++ lib.optionals (lib.versionAtLeast super.open3d.version "0.16.0") [
pkgs.mesa
(
pkgs.symlinkJoin {
@ -1341,15 +1342,35 @@ lib.composeManyExtensions [
)
];
})
] else [ ]);
];
# Patch the dylib in the binary distribution to point to the nix build of libomp
preFixup = lib.optionalString (stdenv.isDarwin && lib.versionAtLeast super.open3d.version "0.16.0") ''
install_name_tool -change /opt/homebrew/opt/libomp/lib/libomp.dylib ${pkgs.llvmPackages.openmp}/lib/libomp.dylib $out/lib/python*/site-packages/open3d/cpu/pybind.cpython-*-darwin.so
'';
# TODO(Sem Mulder): Add overridable flags for CUDA/PyTorch/Tensorflow support.
autoPatchelfIgnoreMissingDeps = true;
});
# Overrides for building packages based on OpenCV
# These flags are inspired by the opencv 4.x package in nixpkgs
_opencv-python-override =
old: {
# Disable OpenCL on macOS
# Can't use cmakeFlags because cmake is called by setup.py
CMAKE_ARGS = lib.optionalString stdenv.isDarwin "-DWITH_OPENCL=OFF";
nativeBuildInputs = [ pkgs.cmake ] ++ old.nativeBuildInputs;
buildInputs = [ self.scikit-build ] ++ (old.buildInputs or [ ]);
buildInputs = [
self.scikit-build
] ++ lib.optionals stdenv.isDarwin (with pkgs.darwin.apple_sdk.frameworks; [
AVFoundation
Cocoa
CoreMedia
MediaToolbox
VideoDecodeAcceleration
]) ++ (old.buildInputs or [ ]);
dontUseCmakeConfigure = true;
};
@ -1357,13 +1378,7 @@ lib.composeManyExtensions [
opencv-python-headless = super.opencv-python.overridePythonAttrs self._opencv-python-override;
opencv-contrib-python = super.opencv-contrib-python.overridePythonAttrs (
old: {
nativeBuildInputs = [ pkgs.cmake ] ++ old.nativeBuildInputs;
buildInputs = [ self.scikit-build ] ++ (old.buildInputs or [ ]);
dontUseCmakeConfigure = true;
}
);
opencv-contrib-python = super.opencv-contrib-python.overridePythonAttrs self._opencv-python-override;
openexr = super.openexr.overridePythonAttrs (
old: {
@ -1775,6 +1790,13 @@ lib.composeManyExtensions [
++ [ pkgs.freetds ];
});
pyopencl = super.pyopencl.overridePythonAttrs (
old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.numpy ];
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ pkgs.ocl-icd pkgs.opencl-headers ];
}
);
pyopenssl = super.pyopenssl.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.openssl ];
@ -2705,6 +2727,10 @@ lib.composeManyExtensions [
'if True:'
'';
});
mkdocs = super.mkdocs.overridePythonAttrs (old: {
propagatedBuildInputs = old.propagatedBuildInputs or [ ] ++ [ self.babel ];
});
}
)

View file

@ -52,8 +52,5 @@ poetry2nix.mkPoetryApplication {
meta = with lib; {
inherit (python.meta) platforms;
maintainers = with maintainers; [ adisbladis jakewaksbaum ];
knownVulnerabilities = [
"CVE-2022-42966" # cleo version in poetry.lock is vulnerable
];
};
}

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
[tool.poetry]
name = "poetry"
version = "1.2.2"
version = "1.3.0"
description = "Python dependency management and packaging made easy."
authors = [
"Sébastien Eustace <sebastien@eustace.io>",
@ -37,6 +37,9 @@ classifiers = [
"Topic :: Software Development :: Libraries :: Python Modules"
]
[tool.poetry.urls]
Changelog = "https://python-poetry.org/history/"
[tool.poetry.build]
generate-setup-file = false
@ -44,39 +47,46 @@ generate-setup-file = false
[tool.poetry.dependencies]
python = "^3.7"
poetry-core = "1.3.2"
poetry-plugin-export = "^1.1.2"
poetry-core = "1.4.0"
poetry-plugin-export = "^1.2.0"
"backports.cached-property" = { version = "^1.0.2", python = "<3.8" }
cachecontrol = { version = "^0.12.9", extras = ["filecache"] }
cachy = "^0.3.0"
cleo = "^1.0.0a5"
crashtest = "^0.3.0"
cleo = "^2.0.0"
crashtest = "^0.4.1"
dulwich = "^0.20.46"
filelock = "^3.8.0"
html5lib = "^1.0"
importlib-metadata = { version = "^4.4", python = "<3.10" }
jsonschema = "^4.10.0"
# keyring uses calver, so version is unclamped
keyring = ">=21.2.0"
keyring = "^23.9.0"
# packaging uses calver, so version is unclamped
packaging = ">=20.4"
pexpect = "^4.7.0"
pkginfo = "^1.5"
platformdirs = "^2.5.2"
requests = "^2.18"
requests-toolbelt = "^0.9.1"
requests-toolbelt = ">=0.9.1,<0.11.0"
shellingham = "^1.5"
tomli = { version = "^2.0.1", python = "<3.11" }
# exclude 0.11.2 and 0.11.3 due to https://github.com/sdispater/tomlkit/issues/225
tomlkit = ">=0.11.1,<1.0.0,!=0.11.2,!=0.11.3"
# trove-classifiers uses calver, so version is unclamped
trove-classifiers = ">=2022.5.19"
# exclude 20.4.5 - 20.4.6 due to https://github.com/pypa/pip/issues/9953
virtualenv = ">=20.4.3,!=20.4.5,!=20.4.6"
xattr = { version = "^0.9.7", markers = "sys_platform == 'darwin'" }
virtualenv = [
{ version = "^20.4.3,!=20.4.5,!=20.4.6", markers = "sys_platform != 'win32' or python_version != '3.9'" },
# see https://github.com/python-poetry/poetry/pull/6950 for details
{ version = "^20.4.3,!=20.4.5,!=20.4.6,<20.16.6", markers = "sys_platform == 'win32' and python_version == '3.9'" },
]
xattr = { version = "^0.10.0", markers = "sys_platform == 'darwin'" }
urllib3 = "^1.26.0"
dulwich = "^0.20.46"
[tool.poetry.group.dev.dependencies]
tox = "^3.18"
pre-commit = "^2.6"
[tool.poetry.group.test.dependencies]
# Cachy frozen to test backwards compatibility for `poetry.utils.cache`.
cachy = "0.3.0"
deepdiff = "^5.0"
flatdict = "^4.0.1"
httpretty = "^1.0"
@ -88,7 +98,7 @@ pytest-xdist = { version = "^2.5", extras = ["psutil"] }
zipp = { version = "^3.4", python = "<3.8" }
[tool.poetry.group.typing.dependencies]
mypy = ">=0.971"
mypy = ">=0.990"
types-html5lib = ">=1.1.9"
types-jsonschema = ">=4.9.0"
types-requests = ">=2.28.8"
@ -163,9 +173,7 @@ warn_unused_ignores = false
[[tool.mypy.overrides]]
module = [
'cachecontrol.*',
'cachy.*',
'cleo.*',
'crashtest.*',
'lockfile.*',
'pexpect.*',
'pkginfo.*',
'requests_toolbelt.*',

View file

@ -1,8 +1,8 @@
{
"owner": "python-poetry",
"repo": "poetry",
"rev": "1.2.2",
"sha256": "04cdrq9mjdnp28jx63vjlwj72wrad7941hp3k7263qskzlp27ql6",
"rev": "1.3.0",
"sha256": "16ng59ykm7zkjizmwb482y0hawpjjr5mvl0ahjd790xzxcc2bbbv",
"fetchSubmodules": true
}