67 lines
1.1 KiB
Nix
67 lines
1.1 KiB
Nix
|
{
|
||
|
lib,
|
||
|
buildPythonPackage,
|
||
|
fetchFromGitHub,
|
||
|
pythonOlder,
|
||
|
cython,
|
||
|
expandvars,
|
||
|
setuptools,
|
||
|
idna,
|
||
|
multidict,
|
||
|
pytest-cov-stub,
|
||
|
pytest-xdist,
|
||
|
pytestCheckHook,
|
||
|
}:
|
||
|
|
||
|
buildPythonPackage rec {
|
||
|
pname = "yarl";
|
||
|
version = "1.13.1";
|
||
|
|
||
|
disabled = pythonOlder "3.8";
|
||
|
|
||
|
pyproject = true;
|
||
|
|
||
|
src = fetchFromGitHub {
|
||
|
owner = "aio-libs";
|
||
|
repo = "yarl";
|
||
|
rev = "refs/tags/v${version}";
|
||
|
hash = "sha256-I6/c5Q6/SRw8PIW4rPLKhVRVPRIC+n+Cz+UrKn5Pv/0=";
|
||
|
};
|
||
|
|
||
|
build-system = [
|
||
|
cython
|
||
|
expandvars
|
||
|
setuptools
|
||
|
];
|
||
|
|
||
|
dependencies = [
|
||
|
idna
|
||
|
multidict
|
||
|
];
|
||
|
|
||
|
preCheck = ''
|
||
|
# don't import yarl from ./ so the C extension is available
|
||
|
pushd tests
|
||
|
'';
|
||
|
|
||
|
nativeCheckInputs = [
|
||
|
pytest-cov-stub
|
||
|
pytest-xdist
|
||
|
pytestCheckHook
|
||
|
];
|
||
|
|
||
|
postCheck = ''
|
||
|
popd
|
||
|
'';
|
||
|
|
||
|
pythonImportsCheck = [ "yarl" ];
|
||
|
|
||
|
meta = with lib; {
|
||
|
changelog = "https://github.com/aio-libs/yarl/blob/v${version}/CHANGES.rst";
|
||
|
description = "Yet another URL library";
|
||
|
homepage = "https://github.com/aio-libs/yarl";
|
||
|
license = licenses.asl20;
|
||
|
maintainers = with maintainers; [ dotlambda ];
|
||
|
};
|
||
|
}
|