1{
2 lib,
3 stdenv,
4 attrs,
5 buildPythonPackage,
6 distro,
7 fetchFromGitHub,
8 parameterized,
9 jsonschema,
10 mock,
11 packaging,
12 pytestCheckHook,
13 pythonOlder,
14 setuptools,
15 testfixtures,
16 zipfile2,
17}:
18
19buildPythonPackage rec {
20 pname = "okonomiyaki";
21 version = "3.0.0";
22 pyproject = true;
23
24 disabled = pythonOlder "3.9";
25
26 src = fetchFromGitHub {
27 owner = "enthought";
28 repo = "okonomiyaki";
29 tag = version;
30 hash = "sha256-xAF9Tdr+IM3lU+mcNcAWATJLZOVvbx0llqznqHLVqDc=";
31 };
32
33 build-system = [ setuptools ];
34
35 optional-dependencies = {
36 all = [
37 attrs
38 distro
39 jsonschema
40 zipfile2
41 ];
42 platforms = [
43 attrs
44 distro
45 ];
46 formats = [
47 attrs
48 distro
49 jsonschema
50 zipfile2
51 ];
52 };
53
54 nativeCheckInputs = [
55 packaging
56 parameterized
57 pytestCheckHook
58 testfixtures
59 ]
60 ++ lib.flatten (builtins.attrValues optional-dependencies);
61
62 preCheck = ''
63 substituteInPlace okonomiyaki/runtimes/tests/test_runtime.py \
64 --replace-fail 'runtime_info = PythonRuntime.from_running_python()' 'raise unittest.SkipTest() #'
65 substituteInPlace okonomiyaki/platforms/_platform.py \
66 --replace-fail 'name.split()[0]' '(name.split() or [""])[0]'
67 '';
68
69 pythonImportsCheck = [ "okonomiyaki" ];
70
71 meta = with lib; {
72 description = "Experimental library aimed at consolidating a lot of low-level code used for Enthought's eggs";
73 homepage = "https://github.com/enthought/okonomiyaki";
74 changelog = "https://github.com/enthought/okonomiyaki/releases/tag/${src.tag}";
75 maintainers = with maintainers; [ genericnerdyusername ];
76 license = licenses.bsd3;
77 };
78}