2 files changed +69
-0
lines changed Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change @@ -12017,6 +12017,8 @@ self: super: with self; {
12017
12017
12018
12018
pyleri = callPackage ../development/python-modules/pyleri { };
12019
12019
12020
+ pylette = callPackage ../development/python-modules/pylette { };
12021
+
12020
12022
pylev = callPackage ../development/python-modules/pylev { };
12021
12023
12022
12024
pylgnetcast = callPackage ../development/python-modules/pylgnetcast { };
0 commit comments