1{ lib
2, buildPythonPackage
3, fetchPypi
4, pytest
5, simplejson
6, mock
7, glibcLocales
8, html5lib
9, pythonOlder
10, enum34
11, python
12, docutils
13, jinja2
14, pygments
15, alabaster
16, Babel
17, snowballstemmer
18, six
19, whoosh
20, imagesize
21, requests
22, sphinxcontrib-applehelp
23, sphinxcontrib-devhelp
24, sphinxcontrib-htmlhelp
25, sphinxcontrib-jsmath
26, sphinxcontrib-qthelp
27, sphinxcontrib-serializinghtml
28, sphinxcontrib-websupport
29, typing
30, setuptools
31}:
32
33buildPythonPackage rec {
34 pname = "sphinx";
35 version = "3.0.3";
36 src = fetchPypi {
37 pname = "Sphinx";
38 inherit version;
39 sha256 = "0wpmqfx4mxv5kv9xxd6wyfsm8vcnp8p99h14q7b6if2mv69gvvb2";
40 };
41 LC_ALL = "en_US.UTF-8";
42
43 checkInputs = [ pytest ];
44 buildInputs = [ simplejson mock glibcLocales html5lib ] ++ lib.optional (pythonOlder "3.4") enum34;
45 # Disable two tests that require network access.
46 checkPhase = ''
47 cd tests; ${python.interpreter} run.py --ignore py35 -k 'not test_defaults and not test_anchors_ignored'
48 '';
49 propagatedBuildInputs = [
50 docutils
51 jinja2
52 pygments
53 alabaster
54 Babel
55 setuptools
56 snowballstemmer
57 six
58 whoosh
59 imagesize
60 requests
61 sphinxcontrib-applehelp
62 sphinxcontrib-devhelp
63 sphinxcontrib-htmlhelp
64 sphinxcontrib-jsmath
65 sphinxcontrib-qthelp
66 sphinxcontrib-serializinghtml
67 sphinxcontrib-websupport
68 ] ++ lib.optional (pythonOlder "3.5") typing;
69
70 # Lots of tests. Needs network as well at some point.
71 doCheck = false;
72
73 meta = {
74 description = "A tool that makes it easy to create intelligent and beautiful documentation for Python projects";
75 homepage = "http://sphinx.pocoo.org/";
76 license = lib.licenses.bsd3;
77 maintainers = with lib.maintainers; [ nand0p ];
78 };
79}