evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / docutils / default.nix
blob695d351f03ca52d11d999be0e3f00567c702deb7
2   stdenv,
3   lib,
4   fetchFromRepoOrCz,
5   buildPythonPackage,
6   flit-core,
7   pillow,
8   python,
9   pythonOlder,
12 # Note: this package is used to build LLVM’s documentation, which is part of the Darwin stdenv.
13 # It cannot use `fetchgit` because that would pull curl into the bootstrap, which is disallowed.
15 let
16   self = buildPythonPackage rec {
17     pname = "docutils";
18     version = "0.21.2";
19     pyproject = true;
21     disabled = pythonOlder "3.7";
23     src = fetchFromRepoOrCz {
24       repo = "docutils";
25       rev = "docutils-${version}";
26       hash = "sha256-Q+9yW+BYUEvPYV504368JsAoKKoaTZTeKh4tVeiNv5Y=";
27     };
29     build-system = [ flit-core ];
31     # infinite recursion via sphinx and pillow
32     doCheck = false;
33     passthru.tests.pytest = self.overridePythonAttrs { doCheck = true; };
35     nativeCheckInputs = [ pillow ];
37     # Only Darwin needs LANG, but we could set it in general.
38     # It's done here conditionally to prevent mass-rebuilds.
39     checkPhase =
40       lib.optionalString stdenv.hostPlatform.isDarwin ''LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" ''
41       + ''
42         ${python.interpreter} test/alltests.py
43       '';
45     # Create symlinks lacking a ".py" suffix, many programs depend on these names
46     postFixup = ''
47       for f in $out/bin/*.py; do
48         ln -s $(basename $f) $out/bin/$(basename $f .py)
49       done
50     '';
52     meta = with lib; {
53       description = "Python Documentation Utilities";
54       homepage = "http://docutils.sourceforge.net/";
55       license = with licenses; [
56         publicDomain
57         bsd2
58         psfl
59         gpl3Plus
60       ];
61       maintainers = with maintainers; [ AndersonTorres ];
62     };
63   };
65 self