3
0
Fork 0
forked from mirrors/nixpkgs

pythonPackages.bleach: 1.4.3 -> 1.5.0, closes #21450

Unfortunately bleach depends on an older version of html5lib and cannot
use the latest version because the sanitizer module has been moved out.
https://github.com/mozilla/bleach/issues/217
This commit is contained in:
Frederik Rietdijk 2016-12-29 09:23:43 +01:00
parent 0e400de967
commit 2f977b4af1

View file

@ -2808,17 +2808,39 @@ in {
};
};
# Needed for bleach 1.5.0
html5lib_0_9999999 = self.html5lib.override rec {
name = "html5lib-${version}";
buildInputs = with self; [ nose flake8 ];
propagatedBuildInputs = with self; [ six ];
checkPhase = ''
nosetests
'';
version = "0.9999999";
src = pkgs.fetchurl {
url = "https://github.com/html5lib/html5lib-python/archive/0.9999999.tar.gz";
sha256 = "1s6wdbrjzw5jhyfbskf4nj1i5bjpjqq9f89a7r1rl59rhpwmfhhq";
};
};
bleach = buildPythonPackage rec {
version = "v1.4.3";
name = "bleach-${version}";
pname = "bleach";
version = "1.5.0";
name = "${pname}-${version}";
src = pkgs.fetchurl {
url = "http://github.com/jsocol/bleach/archive/${version}.tar.gz";
sha256 = "0mk8780ilip0m890rapbckngw8k42gca3551kri297pyylr06l5m";
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
sha256 = "978e758599b54cd3caa2e160d74102879b230ea8dc93871d0783721eef58bc65";
};
buildInputs = with self; [ nose ];
propagatedBuildInputs = with self; [ six html5lib ];
buildInputs = with self; [ pytest pytestrunner ];
propagatedBuildInputs = with self; [ six html5lib_0_9999999 ];
postPatch = ''
substituteInPlace setup.py --replace "==3.0.3" ""
substituteInPlace setup.py --replace ">=0.999,!=0.9999,!=0.99999,<0.99999999" ""
'';
meta = {
description = "An easy, HTML5, whitelisting HTML sanitizer";