2020-07-07 22:35:00 +01:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub
|
2019-10-21 16:57:20 +01:00
|
|
|
, cython
|
2017-12-30 14:10:02 +00:00
|
|
|
, libxml2
|
|
|
|
, libxslt
|
2019-10-21 16:57:20 +01:00
|
|
|
, zlib
|
2017-12-30 14:10:02 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "lxml";
|
2021-02-13 12:47:23 +00:00
|
|
|
version = "4.6.2";
|
2017-12-30 14:10:02 +00:00
|
|
|
|
2019-10-21 16:57:20 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "${pname}-${version}";
|
2021-02-13 12:47:23 +00:00
|
|
|
sha256 = "1zidx62sxh2r4fmjfjzd4f6i4yxgzkpd20nafbyr0i0wnw9da3fd";
|
2017-12-30 14:10:02 +00:00
|
|
|
};
|
|
|
|
|
2019-10-21 16:57:20 +01:00
|
|
|
# setuptoolsBuildPhase needs dependencies to be passed through nativeBuildInputs
|
|
|
|
nativeBuildInputs = [ libxml2.dev libxslt.dev cython ];
|
|
|
|
buildInputs = [ libxml2 libxslt zlib ];
|
2017-12-30 14:10:02 +00:00
|
|
|
|
2019-10-21 16:57:20 +01:00
|
|
|
# tests are meant to be ran "in-place" in the same directory as src
|
|
|
|
doCheck = false;
|
2017-12-30 14:10:02 +00:00
|
|
|
|
2019-10-21 16:57:20 +01:00
|
|
|
pythonImportsCheck = [ "lxml" "lxml.etree" ];
|
|
|
|
|
2020-07-07 22:35:00 +01:00
|
|
|
meta = with lib; {
|
2017-12-30 14:10:02 +00:00
|
|
|
description = "Pythonic binding for the libxml2 and libxslt libraries";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://lxml.de";
|
2019-10-21 16:57:20 +01:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ jonringer sjourdois ];
|
2017-12-30 14:10:02 +00:00
|
|
|
};
|
2018-06-30 01:18:27 +01:00
|
|
|
}
|