2024-01-02 11:29:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2024-02-29 20:09:43 +00:00
|
|
|
, pytestCheckHook
|
2024-01-02 11:29:13 +00:00
|
|
|
, pythonAtLeast
|
|
|
|
, pythonOlder
|
2024-05-15 15:35:15 +00:00
|
|
|
, defusedxml
|
2024-02-29 20:09:43 +00:00
|
|
|
, setuptools
|
|
|
|
, sphinx
|
2024-05-15 15:35:15 +00:00
|
|
|
, typing-extensions
|
2024-02-29 20:09:43 +00:00
|
|
|
, unidecode
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "uqbar";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.7.4";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-q4p+ki5wA/gYGWnt2tzCiEakk4fBl9P96ONz2ZxlCCg=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
postPatch = ''
|
2024-02-29 20:09:43 +00:00
|
|
|
sed -i pyproject.toml \
|
|
|
|
-e '/"black"/d' \
|
|
|
|
-e "/--cov/d"
|
2024-01-13 08:15:51 +00:00
|
|
|
'';
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
unidecode
|
|
|
|
sphinx
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
checkInputs = [
|
|
|
|
defusedxml
|
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabledTests = [
|
2024-02-29 20:09:43 +00:00
|
|
|
# UnboundLocalError: local variable 'output_path' referenced before assignment
|
2024-01-02 11:29:13 +00:00
|
|
|
"test_01"
|
|
|
|
# AssertionError: assert False
|
|
|
|
"test_sphinx_book_html_cached"
|
|
|
|
# FileNotFoundError: [Errno 2] No such file or directory: 'unflatten'
|
|
|
|
"test_sphinx_style_html"
|
|
|
|
# assert not ["\x1b[91mWARNING: dot command 'dot' cannot be run (needed for
|
|
|
|
# graphviz output), check the graphviz_dot setting\x1b[39;49;00m"]
|
|
|
|
"test_sphinx_style_latex"
|
2024-02-29 20:09:43 +00:00
|
|
|
] ++ lib.optional (pythonAtLeast "3.11") [
|
|
|
|
# assert not '\x1b[91m/build/uqbar-0.7.0/tests/fake_package/enums.py:docstring
|
|
|
|
"test_sphinx_style"
|
|
|
|
] ++ lib.optional (pythonAtLeast "3.12") [
|
|
|
|
# https://github.com/josiah-wolf-oberholtzer/uqbar/issues/93
|
|
|
|
"objects.get_vars"
|
|
|
|
];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"uqbar"
|
|
|
|
];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
meta = with lib; {
|
2024-01-02 11:29:13 +00:00
|
|
|
description = "Tools for creating Sphinx and Graphviz documentation";
|
|
|
|
homepage = "https://github.com/josiah-wolf-oberholtzer/uqbar";
|
2024-02-29 20:09:43 +00:00
|
|
|
changelog = "https://github.com/josiah-wolf-oberholtzer/uqbar/releases/tag/v${version}";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ davisrichard437 ];
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
}
|