Skip to content

Commit 9841dee

Browse files
committedJan 19, 2025
python3Packages.pylette: init at 4.0.0
1 parent 3dffcef commit 9841dee

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchFromGitHub,
5+
poetry-core,
6+
scikit-learn,
7+
typer,
8+
requests,
9+
pillow,
10+
numpy,
11+
pytestCheckHook,
12+
opencv-python,
13+
requests-mock,
14+
}:
15+
buildPythonPackage rec {
16+
pname = "pylette";
17+
version = "4.0.0";
18+
pyproject = true;
19+
20+
src = fetchFromGitHub {
21+
owner = "qTipTip";
22+
repo = "Pylette";
23+
tag = version;
24+
hash = "sha256-i8+QQpYoRfgoV9Nm/FvXSJV+TEvmaaPsPIeG+PU838Q=";
25+
};
26+
27+
build-system = [
28+
poetry-core
29+
];
30+
31+
postPatch = ''
32+
substituteInPlace pyproject.toml \
33+
--replace-fail "Pillow = \">=9.3,<11.0\"" "Pillow = \"^11\""
34+
substituteInPlace pyproject.toml \
35+
--replace-fail "numpy = \"^1.26.4\"" "numpy = \"^2\""
36+
'';
37+
38+
dependencies = [
39+
scikit-learn
40+
pillow
41+
requests
42+
typer
43+
numpy
44+
];
45+
46+
pythonImportsCheck = [
47+
"Pylette"
48+
];
49+
50+
# Ignoring this test. It's hanging without resolving
51+
disabledTests = [ "test_color_extraction_deterministic_kmeans" ];
52+
53+
nativeCheckInputs = [
54+
opencv-python
55+
pytestCheckHook
56+
requests-mock
57+
typer
58+
];
59+
60+
meta = {
61+
changelog = "https://github.com/qTipTip/Pylette/releases/tag/${version}";
62+
description = "Python library for extracting color palettes from images";
63+
homepage = "https://qtiptip.github.io/Pylette/";
64+
license = lib.licenses.mit;
65+
maintainers = with lib.maintainers; [ DataHearth ];
66+
};
67+
}

‎pkgs/top-level/python-packages.nix

+2
Original file line numberDiff line numberDiff line change
@@ -12017,6 +12017,8 @@ self: super: with self; {
1201712017

1201812018
pyleri = callPackage ../development/python-modules/pyleri { };
1201912019

12020+
pylette = callPackage ../development/python-modules/pylette { };
12021+
1202012022
pylev = callPackage ../development/python-modules/pylev { };
1202112023

1202212024
pylgnetcast = callPackage ../development/python-modules/pylgnetcast { };

0 commit comments

Comments
 (0)
Failed to load comments.