1{ 2 stdenv, 3 lib, 4 buildPythonPackage, 5 fetchFromGitHub, 6 pytestCheckHook, 7 chardet, 8 cssselect, 9 lxml, 10 timeout-decorator, 11}: 12 13buildPythonPackage rec { 14 pname = "readability-lxml"; 15 version = "0.8.1"; 16 format = "setuptools"; 17 18 src = fetchFromGitHub { 19 owner = "buriy"; 20 repo = "python-readability"; 21 rev = "v${version}"; 22 hash = "sha256-MKdQRety24qOG9xgIdaCJ72XEImP42SlMG6tC7bwzo4="; 23 }; 24 25 propagatedBuildInputs = [ 26 chardet 27 cssselect 28 lxml 29 ]; 30 31 postPatch = '' 32 substituteInPlace setup.py --replace 'sys.platform == "darwin"' "False" 33 ''; 34 35 nativeCheckInputs = [ 36 pytestCheckHook 37 timeout-decorator 38 ]; 39 40 disabledTests = lib.optionals stdenv.isDarwin [ 41 # Test is broken on darwin. Fix in master from https://github.com/buriy/python-readability/pull/178 42 "test_many_repeated_spaces" 43 ]; 44 45 meta = with lib; { 46 description = "Fast python port of arc90's readability tool"; 47 homepage = "https://github.com/buriy/python-readability"; 48 license = licenses.asl20; 49 maintainers = with maintainers; [ siraben ]; 50 }; 51}