2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pythonOlder,
|
|
|
|
cython,
|
|
|
|
expandvars,
|
|
|
|
setuptools,
|
|
|
|
idna,
|
|
|
|
multidict,
|
|
|
|
typing-extensions,
|
|
|
|
pytest-xdist,
|
|
|
|
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 = [
|
2024-04-21 15:54:59 +00:00
|
|
|
cython
|
2024-01-13 08:15:51 +00:00
|
|
|
expandvars
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
idna
|
|
|
|
multidict
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|