2022-01-13 20:06:32 +00:00
|
|
|
{ lib
|
|
|
|
, aspell
|
|
|
|
, aspellDicts
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy27
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonAtLeast
|
|
|
|
}:
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aspell-python";
|
|
|
|
version = "1.15";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "aspell-python-py3";
|
2022-01-13 20:06:32 +00:00
|
|
|
inherit version;
|
2021-02-13 14:23:35 +00:00
|
|
|
extension = "tar.bz2";
|
2022-01-13 20:06:32 +00:00
|
|
|
hash = "sha256-IEKRDmQY5fOH9bQk0dkUAy7UzpBOoZW4cNtVvLMcs40=";
|
2021-02-13 14:23:35 +00:00
|
|
|
};
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
buildInputs = [
|
|
|
|
aspell
|
|
|
|
];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
2021-02-13 14:23:35 +00:00
|
|
|
export ASPELL_CONF="dict-dir ${aspellDicts.en}/lib/aspell"
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"test/unittests.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = lib.optionals (pythonAtLeast "3.10") [
|
|
|
|
# https://github.com/WojciechMula/aspell-python/issues/22
|
|
|
|
"test_add"
|
|
|
|
"test_get"
|
|
|
|
"test_saveall"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"aspell"
|
|
|
|
];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-01-13 20:06:32 +00:00
|
|
|
description = "Python wrapper for aspell (C extension and Python version)";
|
2021-02-13 14:23:35 +00:00
|
|
|
homepage = "https://github.com/WojciechMula/aspell-python";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
|
|
|
};
|
|
|
|
}
|