python3Packages.{imagecodecs, sdflit, swcgeom}: init at {2025.3.30, 0.2.6, 0.19.3} (#399413)

This commit is contained in:
Pol Dellaiera
2025-05-10 07:43:45 +00:00
committed by GitHub
4 changed files with 233 additions and 0 deletions
@@ -0,0 +1,90 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
cython,
numpy,
setuptools,
pkgs,
jxrlib,
lcms2,
lerc,
libdeflate,
libpng,
libtiff,
libwebp,
openjpeg,
xz,
zlib,
zstd,
pytest,
}:
let
version = "2025.3.30";
in
buildPythonPackage {
pname = "imagecodecs";
inherit version;
pyproject = true;
src = fetchFromGitHub {
owner = "cgohlke";
repo = "imagecodecs";
tag = "v${version}";
hash = "sha256-KtrQNABQOr3mNiWOfaZBcFceSCixPGV8Hte2uPKn1+k=";
};
build-system = [
cython
numpy
setuptools
];
nativeBuildInputs = [
pkgs.lz4.dev # lz4 was hidden by python3Packages.lz4
lcms2.dev
openjpeg.dev
];
buildInputs = [
pkgs.lz4
jxrlib
lcms2
lerc
libdeflate
libpng
libtiff
libwebp
openjpeg
xz # liblzma
zlib
zstd
];
dependencies = [
numpy
];
prePatch = ''
substituteInPlace setup.py \
--replace-fail "/usr/include/openjpeg" "${openjpeg.dev}/include/openjpeg" \
--replace-fail "/usr/include/jxrlib" "${jxrlib}/include/jxrlib"
'';
nativeCheckInputs = [
pytest
];
pythonImportsCheck = [
"imagecodecs"
];
meta = {
description = "Image transformation, compression, and decompression codecs";
homepage = "https://github.com/cgohlke/imagecodecs";
changelog = "https://github.com/cgohlke/imagecodecs/blob/v${version}/CHANGES.rst";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ yzx9 ];
};
}
@@ -0,0 +1,47 @@
{
lib,
fetchFromGitHub,
buildPythonPackage,
cargo,
rustPlatform,
rustc,
}:
let
version = "0.2.6";
src = fetchFromGitHub {
owner = "yzx9";
repo = "sdflit";
tag = "v${version}";
hash = "sha256-Ze3J5Dp+TskhIiGP6kMK3AIHLnhVBuEaKJokccIr+SM=";
};
in
buildPythonPackage {
pname = "sdflit";
inherit version src;
pyproject = true;
cargoDeps = rustPlatform.fetchCargoVendor {
inherit src;
hash = "sha256-CrMe5DuO9sQZZ50Hy+av4nF4gbOe296zSWJfJ8th7zs=";
};
build-system = [
cargo
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
rustc
];
pythonImportsCheck = [
"sdflit"
];
meta = {
description = "Fast and Robust Signed Distance Function Library";
homepage = "https://github.com/yzx9/sdflit";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ yzx9 ];
};
}
@@ -0,0 +1,90 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
cython,
numpy,
setuptools,
wheel,
imagecodecs,
matplotlib,
pandas,
pynrrd,
scipy,
sdflit,
seaborn,
tifffile,
tqdm,
typing-extensions,
beautifulsoup4,
certifi,
chardet,
lmdb,
requests,
urllib3,
pytest,
}:
let
version = "0.19.3";
in
buildPythonPackage {
pname = "swcgeom";
inherit version;
pyproject = true;
src = fetchFromGitHub {
owner = "yzx9";
repo = "swcgeom";
tag = "v${version}";
hash = "sha256-mpp8Dw0XcU59fYt7vjswAnXCmrRP3mhbgTDG+J4UwzI=";
};
build-system = [
cython
numpy
setuptools
wheel
];
dependencies = [
imagecodecs
matplotlib
numpy
pandas
pynrrd
scipy
sdflit
seaborn
tifffile
tqdm
typing-extensions
];
optional-dependencies = {
all = [
beautifulsoup4
certifi
chardet
lmdb
requests
urllib3
];
};
nativeCheckInputs = [
pytest
];
pythonImportsCheck = [
"swcgeom"
];
meta = {
description = "Neuron geometry library for swc format";
homepage = "https://github.com/yzx9/swcgeom";
changelog = "https://github.com/yzx9/swcgeom/blob/v${version}/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ yzx9 ];
};
}
+6
View File
@@ -6636,6 +6636,8 @@ self: super: with self; {
image-go-nord = callPackage ../development/python-modules/image-go-nord { };
imagecodecs = callPackage ../development/python-modules/imagecodecs { };
imagecodecs-lite = callPackage ../development/python-modules/imagecodecs-lite { };
imagecorruptions = callPackage ../development/python-modules/imagecorruptions { };
@@ -15584,6 +15586,8 @@ self: super: with self; {
sdds = callPackage ../development/python-modules/sdds { };
sdflit = callPackage ../development/python-modules/sdflit { };
sdjson = callPackage ../development/python-modules/sdjson { };
sdkmanager = callPackage ../development/python-modules/sdkmanager { };
@@ -16865,6 +16869,8 @@ self: super: with self; {
swagger-ui-bundle = callPackage ../development/python-modules/swagger-ui-bundle { };
swcgeom = callPackage ../development/python-modules/swcgeom { };
swh-auth = callPackage ../development/python-modules/swh-auth { };
swh-core = callPackage ../development/python-modules/swh-core { };