1{
2 buildPythonPackage,
3 stdenv,
4 fetchFromGitHub,
5 lib,
6 attrs,
7 distro,
8 jsonschema,
9 six,
10 zipfile2,
11 hypothesis,
12 mock,
13 packaging,
14 testfixtures,
15 pythonAtLeast,
16}:
17
18buildPythonPackage rec {
19 pname = "okonomiyaki";
20 version = "1.4.0";
21 format = "setuptools";
22
23 src = fetchFromGitHub {
24 owner = "enthought";
25 repo = pname;
26 rev = "refs/tags/${version}";
27 hash = "sha256-MEll1H7l41m8uz2/WK/Ilm7Dubg0uqYwe+ZgakO1aXQ=";
28 };
29
30 propagatedBuildInputs = [
31 distro
32 attrs
33 jsonschema
34 six
35 zipfile2
36 ];
37
38 preCheck =
39 ''
40 substituteInPlace okonomiyaki/runtimes/tests/test_runtime.py \
41 --replace 'runtime_info = PythonRuntime.from_running_python()' 'raise unittest.SkipTest() #'
42 ''
43 + lib.optionalString stdenv.isDarwin ''
44 substituteInPlace okonomiyaki/platforms/tests/test_pep425.py \
45 --replace 'self.assertEqual(platform_tag, self.tag.platform)' 'raise unittest.SkipTest()'
46 '';
47
48 checkInputs = [
49 hypothesis
50 mock
51 packaging
52 testfixtures
53 ];
54
55 pythonImportsCheck = [ "okonomiyaki" ];
56
57 meta = with lib; {
58 homepage = "https://github.com/enthought/okonomiyaki";
59 description = "Experimental library aimed at consolidating a lot of low-level code used for Enthought's eggs";
60 maintainers = with maintainers; [ genericnerdyusername ];
61 license = licenses.bsd3;
62 broken = pythonAtLeast "3.12"; # multiple tests are failing
63 };
64}