2023-03-08 16:32:21 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, cairocffi
|
|
|
|
, cython
|
2023-04-12 12:48:02 +00:00
|
|
|
, fetchPypi
|
2023-03-08 16:32:21 +00:00
|
|
|
, igraph
|
|
|
|
, leidenalg
|
|
|
|
, pandas
|
|
|
|
, poetry-core
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2024-04-21 15:54:59 +00:00
|
|
|
, pythonRelaxDepsHook
|
2023-03-08 16:32:21 +00:00
|
|
|
, scipy
|
|
|
|
, setuptools
|
|
|
|
, spacy
|
2023-10-09 19:29:22 +00:00
|
|
|
, spacy-lookups-data
|
2023-03-08 16:32:21 +00:00
|
|
|
, en_core_web_sm
|
|
|
|
, toolz
|
|
|
|
, tqdm
|
|
|
|
, wasabi
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "textnets";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.9.4";
|
2023-03-08 16:32:21 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-4154ytzo1QpwhKA1BkVMss9fNIkysnClW/yfSVlX33M=";
|
2023-03-08 16:32:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonRelaxDepsHook
|
2023-03-08 16:32:21 +00:00
|
|
|
cython
|
|
|
|
poetry-core
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonRelaxDeps = [ "igraph" "leidenalg" ];
|
|
|
|
|
2023-03-08 16:32:21 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cairocffi
|
|
|
|
igraph
|
|
|
|
leidenalg
|
|
|
|
pandas
|
|
|
|
scipy
|
|
|
|
spacy
|
2023-10-09 19:29:22 +00:00
|
|
|
spacy-lookups-data
|
2023-03-08 16:32:21 +00:00
|
|
|
toolz
|
|
|
|
tqdm
|
|
|
|
wasabi
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
en_core_web_sm
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"textnets"
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
# Enables the package to find the cythonized .so files during testing. See #255262
|
|
|
|
preCheck = ''
|
|
|
|
rm -r textnets
|
|
|
|
'';
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabledTests = [
|
2024-04-21 15:54:59 +00:00
|
|
|
# Test fails: Throws a UserWarning asking the user to install `textnets[fca]`.
|
|
|
|
"test_context"
|
2023-11-16 04:20:00 +00:00
|
|
|
];
|
|
|
|
|
2023-03-08 16:32:21 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Text analysis with networks";
|
|
|
|
homepage = "https://textnets.readthedocs.io";
|
|
|
|
changelog = "https://github.com/jboynyc/textnets/blob/v${version}/HISTORY.rst";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ jboy ];
|
|
|
|
};
|
|
|
|
}
|