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
|
2024-01-13 08:15:51 +00:00
|
|
|
, cython_3
|
|
|
|
, expandvars
|
|
|
|
, setuptools
|
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
|
2024-01-13 08:15:51 +00:00
|
|
|
, pytest-xdist
|
2021-12-06 16:07:01 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "yarl";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "1.9.4";
|
2023-01-20 10:41:00 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-Vm24ZxfPgIC5m1iwg7dzqQiuQPBmgeh+WJqXb6+CRr8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
2024-01-13 08:15:51 +00:00
|
|
|
sed -i '/cov/d' pytest.ini
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cython_3
|
|
|
|
expandvars
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
idna
|
|
|
|
multidict
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# don't import yarl from ./ so the C extension is available
|
|
|
|
pushd tests
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2024-01-13 08:15:51 +00:00
|
|
|
pytest-xdist
|
2021-12-06 16:07:01 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postCheck = ''
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "yarl" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-01-20 10:41:00 +00:00
|
|
|
changelog = "https://github.com/aio-libs/yarl/blob/v${version}/CHANGES.rst";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|