1{ 2 lib, 3 aspell, 4 aspellDicts, 5 buildPythonPackage, 6 fetchPypi, 7 isPy27, 8 pytestCheckHook, 9 pythonAtLeast, 10 setuptools, 11}: 12 13buildPythonPackage rec { 14 pname = "aspell-python"; 15 version = "1.15"; 16 pyproject = true; 17 18 disabled = isPy27; 19 20 src = fetchPypi { 21 pname = "aspell-python-py3"; 22 inherit version; 23 extension = "tar.bz2"; 24 hash = "sha256-IEKRDmQY5fOH9bQk0dkUAy7UzpBOoZW4cNtVvLMcs40="; 25 }; 26 27 build-system = [ setuptools ]; 28 29 buildInputs = [ aspell ]; 30 31 nativeCheckInputs = [ pytestCheckHook ]; 32 33 preCheck = '' 34 export ASPELL_CONF="dict-dir ${aspellDicts.en}/lib/aspell" 35 export HOME=$(mktemp -d) 36 ''; 37 38 enabledTestPaths = [ "test/unittests.py" ]; 39 40 disabledTests = lib.optionals (pythonAtLeast "3.10") [ 41 # https://github.com/WojciechMula/aspell-python/issues/22 42 "test_add" 43 "test_get" 44 "test_saveall" 45 ]; 46 47 pythonImportsCheck = [ "aspell" ]; 48 49 meta = with lib; { 50 description = "Python wrapper for aspell (C extension and Python version)"; 51 homepage = "https://github.com/WojciechMula/aspell-python"; 52 license = licenses.bsd3; 53 maintainers = [ ]; 54 }; 55}