Skip to content

Commit 4b27a14

Browse files
committed
python312Packages.rawpy: init at 0.23.2
1 parent 6822ad5 commit 4b27a14

File tree

2 files changed

+92
-0
lines changed

2 files changed

+92
-0
lines changed
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchFromGitHub,
5+
6+
# build-system
7+
cython,
8+
setuptools,
9+
10+
# nativeBuildInputs
11+
pkg-config,
12+
13+
# buildInputs
14+
libraw,
15+
16+
# dependencies
17+
numpy,
18+
19+
# tests
20+
imageio,
21+
pytestCheckHook,
22+
scikit-image,
23+
}:
24+
25+
buildPythonPackage rec {
26+
pname = "rawpy";
27+
version = "0.23.2";
28+
pyproject = true;
29+
30+
src = fetchFromGitHub {
31+
owner = "letmaik";
32+
repo = "rawpy";
33+
rev = "refs/tags/v${version}";
34+
hash = "sha256-s7/YbD5Jy9Jzry817djG63Zs4It8b1S95qmcJgPYGZQ=";
35+
};
36+
37+
build-system = [
38+
cython
39+
numpy
40+
setuptools
41+
];
42+
43+
nativeBuildInputs = [
44+
pkg-config
45+
];
46+
47+
buildInputs = [
48+
libraw
49+
];
50+
51+
dependencies = [
52+
numpy
53+
];
54+
55+
env = {
56+
RAWPY_USE_SYSTEM_LIBRAW = 1;
57+
};
58+
59+
pythonImportsCheck = [
60+
"rawpy"
61+
"rawpy._rawpy"
62+
];
63+
64+
# Delete the source files to load the library from the installed folder instead of the source files
65+
preCheck = ''
66+
rm -rf rawpy
67+
'';
68+
69+
nativeCheckInputs = [
70+
imageio
71+
pytestCheckHook
72+
scikit-image
73+
];
74+
75+
disabledTests = [
76+
# rawpy._rawpy.LibRawFileUnsupportedError: b'Unsupported file format or not RAW file'
77+
"testFoveonFileOpenAndPostProcess"
78+
"testThumbExtractBitmap"
79+
];
80+
81+
meta = {
82+
description = "RAW image processing for Python, a wrapper for libraw";
83+
homepage = "https://github.com/letmaik/rawpy";
84+
license = with lib.licenses; [
85+
lgpl21Only
86+
mit
87+
];
88+
maintainers = with lib.maintainers; [ GaetanLepage ];
89+
};
90+
}

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13666,6 +13666,8 @@ self: super: with self; {
1366613666

1366713667
rawkit = callPackage ../development/python-modules/rawkit { };
1366813668

13669+
rawpy = callPackage ../development/python-modules/rawpy { };
13670+
1366913671
ray = callPackage ../development/python-modules/ray { };
1367013672

1367113673
raylib-python-cffi = callPackage ../development/python-modules/raylib-python-cffi {};

0 commit comments

Comments
 (0)