Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / docutils / default.nix
blobbae0acc1d45d0b11ad185018c628fb737bc5a39d
1 { stdenv
2 , lib
3 , fetchPypi
4 , buildPythonPackage
5 , isPy3k
6 , isPy38
7 , python
8 }:
10 buildPythonPackage rec {
11   pname = "docutils";
12   version = "0.16";
14   src = fetchPypi {
15     inherit pname version;
16     sha256 = "c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc";
17   };
19   # Only Darwin needs LANG, but we could set it in general.
20   # It's done here conditionally to prevent mass-rebuilds.
21   checkPhase = lib.optionalString (isPy3k && stdenv.isDarwin) ''LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" '' + ''
22     ${python.interpreter} test/alltests.py
23   '';
25   # Create symlinks lacking a ".py" suffix, many programs depend on these names
26   postFixup = ''
27     for f in $out/bin/*.py; do
28       ln -s $(basename $f) $out/bin/$(basename $f .py)
29     done
30   '';
32   meta = with lib; {
33     description = "Python Documentation Utilities";
34     homepage = "http://docutils.sourceforge.net/";
35     license = with licenses; [ publicDomain bsd2 psfl gpl3Plus ];
36     maintainers = with maintainers; [ AndersonTorres ];
37   };