2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2021-12-06 16:07:01 +00:00
|
|
|
, fetchPypi
|
2020-09-25 04:45:31 +00:00
|
|
|
, pythonOlder
|
2021-12-06 16:07:01 +00:00
|
|
|
, idna
|
2020-04-24 23:36:52 +00:00
|
|
|
, multidict
|
2020-09-25 04:45:31 +00:00
|
|
|
, typing-extensions
|
2021-12-06 16:07:01 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "yarl";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "1.7.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-RTmbRtYMJTMnpGDpmFZ1IAn87l9dPICy98DK4cONVt0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i '/^addopts/d' setup.cfg
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
idna
|
|
|
|
multidict
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# don't import yarl from ./ so the C extension is available
|
|
|
|
pushd tests
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postCheck = ''
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "yarl" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Yet another URL library";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://github.com/aio-libs/yarl";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|