python3Packages.sphinx: fix build, enable tests, cleanup
This commit is contained in:
parent
9651084620
commit
20549cae36
|
@ -1,24 +1,18 @@
|
||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
|
||||||
, pytest
|
|
||||||
, simplejson
|
|
||||||
, mock
|
|
||||||
, glibcLocales
|
|
||||||
, html5lib
|
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
, enum34
|
, fetchFromGitHub
|
||||||
, python
|
# propagatedBuildInputs
|
||||||
, docutils
|
|
||||||
, jinja2
|
|
||||||
, pygments
|
|
||||||
, alabaster
|
|
||||||
, Babel
|
, Babel
|
||||||
, snowballstemmer
|
, alabaster
|
||||||
, six
|
, docutils
|
||||||
, whoosh
|
|
||||||
, imagesize
|
, imagesize
|
||||||
|
, jinja2
|
||||||
|
, packaging
|
||||||
|
, pygments
|
||||||
, requests
|
, requests
|
||||||
|
, setuptools
|
||||||
|
, snowballstemmer
|
||||||
, sphinxcontrib-applehelp
|
, sphinxcontrib-applehelp
|
||||||
, sphinxcontrib-devhelp
|
, sphinxcontrib-devhelp
|
||||||
, sphinxcontrib-htmlhelp
|
, sphinxcontrib-htmlhelp
|
||||||
|
@ -26,56 +20,70 @@
|
||||||
, sphinxcontrib-qthelp
|
, sphinxcontrib-qthelp
|
||||||
, sphinxcontrib-serializinghtml
|
, sphinxcontrib-serializinghtml
|
||||||
, sphinxcontrib-websupport
|
, sphinxcontrib-websupport
|
||||||
, typing ? null
|
# check phase
|
||||||
, setuptools
|
, html5lib
|
||||||
, packaging
|
, imagemagick
|
||||||
|
, pytestCheckHook
|
||||||
|
, typed-ast
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "sphinx";
|
pname = "sphinx";
|
||||||
version = "3.5.4";
|
version = "3.5.4";
|
||||||
src = fetchPypi {
|
disabled = pythonOlder "3.5";
|
||||||
pname = "Sphinx";
|
|
||||||
inherit version;
|
src = fetchFromGitHub {
|
||||||
sha256 = "19010b7b9fa0dc7756a6e105b2aacd3a80f798af3c25c273be64d7beeb482cb1";
|
owner = "sphinx-doc";
|
||||||
};
|
repo = pname;
|
||||||
LC_ALL = "en_US.UTF-8";
|
rev = "v${version}";
|
||||||
|
sha256 = "1xjii3dl01rq8x2bsxc6zywiy1s7arfgxrg5l8ml54w1748shadd";
|
||||||
|
};
|
||||||
|
|
||||||
checkInputs = [ pytest ];
|
|
||||||
buildInputs = [ simplejson mock glibcLocales html5lib ] ++ lib.optional (pythonOlder "3.4") enum34;
|
|
||||||
# Disable two tests that require network access.
|
|
||||||
checkPhase = ''
|
|
||||||
cd tests; ${python.interpreter} run.py --ignore py35 -k 'not test_defaults and not test_anchors_ignored'
|
|
||||||
'';
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
docutils
|
|
||||||
jinja2
|
|
||||||
pygments
|
|
||||||
alabaster
|
|
||||||
Babel
|
Babel
|
||||||
|
alabaster
|
||||||
|
docutils
|
||||||
|
imagesize
|
||||||
|
jinja2
|
||||||
packaging
|
packaging
|
||||||
|
pygments
|
||||||
|
requests
|
||||||
setuptools
|
setuptools
|
||||||
snowballstemmer
|
snowballstemmer
|
||||||
six
|
|
||||||
whoosh
|
|
||||||
imagesize
|
|
||||||
requests
|
|
||||||
sphinxcontrib-applehelp
|
sphinxcontrib-applehelp
|
||||||
sphinxcontrib-devhelp
|
sphinxcontrib-devhelp
|
||||||
sphinxcontrib-htmlhelp
|
sphinxcontrib-htmlhelp
|
||||||
sphinxcontrib-jsmath
|
sphinxcontrib-jsmath
|
||||||
sphinxcontrib-qthelp
|
sphinxcontrib-qthelp
|
||||||
sphinxcontrib-serializinghtml
|
sphinxcontrib-serializinghtml
|
||||||
|
# extra[docs]
|
||||||
sphinxcontrib-websupport
|
sphinxcontrib-websupport
|
||||||
] ++ lib.optional (pythonOlder "3.5") typing;
|
];
|
||||||
|
|
||||||
# Lots of tests. Needs network as well at some point.
|
checkInputs = [
|
||||||
doCheck = false;
|
imagemagick
|
||||||
|
html5lib
|
||||||
|
pytestCheckHook
|
||||||
|
] ++ lib.optionals (pythonOlder "3.8") [
|
||||||
|
typed-ast
|
||||||
|
];
|
||||||
|
|
||||||
meta = {
|
disabledTests = [
|
||||||
description = "A tool that makes it easy to create intelligent and beautiful documentation for Python projects";
|
# requires network access
|
||||||
|
"test_anchors_ignored"
|
||||||
|
"test_defaults"
|
||||||
|
"test_defaults_json"
|
||||||
|
"test_latex_images"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Python documentation generator";
|
||||||
|
longDescription = ''
|
||||||
|
A tool that makes it easy to create intelligent and beautiful
|
||||||
|
documentation for Python projects
|
||||||
|
'';
|
||||||
homepage = "https://www.sphinx-doc.org";
|
homepage = "https://www.sphinx-doc.org";
|
||||||
license = lib.licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
maintainers = with lib.maintainers; [ nand0p ];
|
maintainers = with maintainers; [ nand0p ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue