1a04744f74
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
74 lines
1.3 KiB
Nix
74 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
anyio,
|
|
buildPythonPackage,
|
|
certifi,
|
|
fetchFromGitHub,
|
|
hatchling,
|
|
hatch-fancy-pypi-readme,
|
|
h11,
|
|
h2,
|
|
pytest-httpbin,
|
|
pytest-trio,
|
|
pytestCheckHook,
|
|
socksio,
|
|
trio,
|
|
# for passthru.tests
|
|
httpx,
|
|
httpx-socks,
|
|
respx,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "httpcore";
|
|
version = "1.0.9";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "encode";
|
|
repo = "httpcore";
|
|
tag = version;
|
|
hash = "sha256-YtAbx0iXN7u8pMBXQBUydvAH6ilH+veklvxSh5EVFXo=";
|
|
};
|
|
|
|
build-system = [
|
|
hatchling
|
|
hatch-fancy-pypi-readme
|
|
];
|
|
|
|
dependencies = [
|
|
certifi
|
|
h11
|
|
];
|
|
|
|
optional-dependencies = {
|
|
asyncio = [ anyio ];
|
|
http2 = [ h2 ];
|
|
socks = [ socksio ];
|
|
trio = [ trio ];
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
pytest-httpbin
|
|
pytest-trio
|
|
pytestCheckHook
|
|
]
|
|
++ lib.concatAttrValues optional-dependencies;
|
|
|
|
pythonImportsCheck = [ "httpcore" ];
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
passthru.tests = {
|
|
inherit httpx httpx-socks respx;
|
|
};
|
|
|
|
meta = {
|
|
changelog = "https://github.com/encode/httpcore/blob/${version}/CHANGELOG.md";
|
|
description = "Minimal low-level HTTP client";
|
|
homepage = "https://github.com/encode/httpcore";
|
|
license = lib.licenses.bsd3;
|
|
maintainers = with lib.maintainers; [ ris ];
|
|
};
|
|
}
|