Merge pull request #141073 from dotlambda/yarl-1.7.0

This commit is contained in:
Martin Weinelt 2021-10-09 13:13:26 +02:00 committed by GitHub
commit dccd80653c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 14 deletions

View file

@ -1,32 +1,52 @@
{ lib
, fetchPypi
, buildPythonPackage
, fetchPypi
, python
, pythonOlder
, multidict
, pytest-runner
, pytest
, typing-extensions
, idna
, multidict
, typing-extensions
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "yarl";
version = "1.6.3";
version = "1.7.0";
src = fetchPypi {
inherit pname version;
sha256 = "8a9066529240171b68893d60dca86a763eae2139dd42f42106b03cf4b426bf10";
sha256 = "8e7ebaf62e19c2feb097ffb7c94deb0f0c9fab52590784c8cd679d30ab009162";
};
checkInputs = [ pytest pytest-runner ];
propagatedBuildInputs = [ multidict idna ]
++ lib.optionals (pythonOlder "3.8") [
typing-extensions
];
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" ];
meta = with lib; {
description = "Yet another URL library";
homepage = "https://github.com/aio-libs/yarl/";
homepage = "https://github.com/aio-libs/yarl";
license = licenses.asl20;
maintainers = with maintainers; [ dotlambda ];
};

View file

@ -147,7 +147,8 @@ in with py.pkgs; buildPythonApplication rec {
--replace "pip>=8.0.3,<20.3" "pip" \
--replace "requests==2.25.1" "requests>=2.25.1" \
--replace "ruamel.yaml==0.15.100" "ruamel.yaml" \
--replace "voluptuous==0.12.1" "voluptuous==0.12.2"
--replace "voluptuous==0.12.1" "voluptuous==0.12.2" \
--replace "yarl==1.6.3" "yarl==1.7.0"
substituteInPlace tests/test_config.py --replace '"/usr"' '"/build/media"'
'';