2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
cairocffi,
|
|
|
|
cython,
|
|
|
|
fetchPypi,
|
|
|
|
igraph,
|
|
|
|
leidenalg,
|
|
|
|
pandas,
|
|
|
|
poetry-core,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
scipy,
|
|
|
|
setuptools,
|
|
|
|
spacy,
|
|
|
|
spacy-lookups-data,
|
|
|
|
en_core_web_sm,
|
|
|
|
toolz,
|
|
|
|
tqdm,
|
|
|
|
wasabi,
|
2023-03-08 16:32:21 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
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 = [
|
|
|
|
cython
|
|
|
|
poetry-core
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"igraph"
|
|
|
|
"leidenalg"
|
|
|
|
];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
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
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "textnets" ];
|
2023-03-08 16:32:21 +00:00
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|