portfolio: 0.71.2 -> 0.72.2 (#360387)
[NixPkgs.git] / pkgs / development / python-modules / okonomiyaki / default.nix
blobbdcddc59c7a74c427782210b5a90ab5a2b0f9f7e
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,
19 buildPythonPackage rec {
20   pname = "okonomiyaki";
21   version = "2.0.0";
22   pyproject = true;
24   disabled = pythonOlder "3.9";
26   src = fetchFromGitHub {
27     owner = "enthought";
28     repo = "okonomiyaki";
29     rev = "refs/tags/${version}";
30     hash = "sha256-JQZhw0H4iSdxoyS6ODICJz1vAZsOISQitX7wTgSS1xc=";
31   };
33   postPatch = ''
34     # Fixed for >= 2.0.0
35     substituteInPlace setup.cfg \
36       --replace-fail "long_description_content_type = rst" "long_description_content_type = text/x-rst"
37   '';
39   build-system = [ setuptools ];
41   optional-dependencies = {
42     all = [
43       attrs
44       distro
45       jsonschema
46       zipfile2
47     ];
48     platforms = [
49       attrs
50       distro
51     ];
52     formats = [
53       attrs
54       distro
55       jsonschema
56       zipfile2
57     ];
58   };
60   nativeCheckInputs = [
61     packaging
62     parameterized
63     pytestCheckHook
64     testfixtures
65   ] ++ lib.flatten (builtins.attrValues optional-dependencies);
67   preCheck =
68     ''
69       substituteInPlace okonomiyaki/runtimes/tests/test_runtime.py \
70         --replace-fail 'runtime_info = PythonRuntime.from_running_python()' 'raise unittest.SkipTest() #'
71     ''
72     + lib.optionalString stdenv.hostPlatform.isDarwin ''
73       substituteInPlace okonomiyaki/platforms/tests/test_pep425.py \
74         --replace-fail 'self.assertEqual(platform_tag, self.tag.platform)' 'raise unittest.SkipTest()'
75     '';
77   pythonImportsCheck = [ "okonomiyaki" ];
79   meta = with lib; {
80     description = "Experimental library aimed at consolidating a lot of low-level code used for Enthought's eggs";
81     homepage = "https://github.com/enthought/okonomiyaki";
82     changelog = "https://github.com/enthought/okonomiyaki/releases/tag/${version}";
83     maintainers = with maintainers; [ genericnerdyusername ];
84     license = licenses.bsd3;
85   };