depot/third_party/nixpkgs/pkgs/development/python-modules/aspell-python/default.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

55 lines
1.1 KiB
Nix

{
lib,
aspell,
aspellDicts,
buildPythonPackage,
fetchPypi,
isPy27,
pytestCheckHook,
pythonAtLeast,
setuptools,
}:
buildPythonPackage rec {
pname = "aspell-python";
version = "1.15";
pyproject = true;
disabled = isPy27;
src = fetchPypi {
pname = "aspell-python-py3";
inherit version;
extension = "tar.bz2";
hash = "sha256-IEKRDmQY5fOH9bQk0dkUAy7UzpBOoZW4cNtVvLMcs40=";
};
build-system = [ setuptools ];
buildInputs = [ aspell ];
nativeCheckInputs = [ pytestCheckHook ];
preCheck = ''
export ASPELL_CONF="dict-dir ${aspellDicts.en}/lib/aspell"
export HOME=$(mktemp -d)
'';
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" ];
meta = with lib; {
description = "Python wrapper for aspell (C extension and Python version)";
homepage = "https://github.com/WojciechMula/aspell-python";
license = licenses.bsd3;
maintainers = [ ];
};
}