mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-01 09:44:18 +00:00
Merge pull request #217295 from fabaff/mmocket-fix
python310Packages.mocket: 3.10.9 -> 3.11.0
This commit is contained in:
commit
89d8ca298b
@ -1,28 +1,35 @@
|
||||
{ buildPythonPackage, lib, fetchPypi, pythonOlder
|
||||
{ lib
|
||||
, aiohttp
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, maxminddb
|
||||
, mocket
|
||||
, pytestCheckHook
|
||||
, pythonAtLeast
|
||||
, pythonOlder
|
||||
, requests
|
||||
, requests-mock
|
||||
, urllib3
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
version = "4.6.0";
|
||||
pname = "geoip2";
|
||||
version = "4.6.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-8OgLzoCwa7OL0Iv0h31ahONU6TIJXmzPtNJ7tZj6T4M=";
|
||||
hash = "sha256-8OgLzoCwa7OL0Iv0h31ahONU6TIJXmzPtNJ7tZj6T4M=";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace requirements.txt --replace "requests>=2.24.0,<3.0.0" "requests"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ aiohttp maxminddb requests urllib3 ];
|
||||
propagatedBuildInputs = [
|
||||
aiohttp
|
||||
maxminddb
|
||||
requests
|
||||
urllib3
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
mocket
|
||||
@ -30,11 +37,21 @@ buildPythonPackage rec {
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "geoip2" ];
|
||||
pythonImportsCheck = [
|
||||
"geoip2"
|
||||
];
|
||||
|
||||
disabledTests = lib.optionals (pythonAtLeast "3.11") [
|
||||
# https://github.com/maxmind/GeoIP2-python/pull/136
|
||||
"TestAsyncClient"
|
||||
] ++ lib.optionals (pythonAtLeast "3.10") [
|
||||
"test_request"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "GeoIP2 webservice client and database reader";
|
||||
homepage = "https://github.com/maxmind/GeoIP2-python";
|
||||
changelog = "https://github.com/maxmind/GeoIP2-python/blob/v${version}/HISTORY.rst";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
|
@ -1,62 +1,69 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pythonOlder
|
||||
, isPy3k
|
||||
, decorator
|
||||
, http-parser
|
||||
, python-magic
|
||||
, urllib3
|
||||
, pytestCheckHook
|
||||
, pytest-mock
|
||||
, aiohttp
|
||||
, asgiref
|
||||
, buildPythonPackage
|
||||
, decorator
|
||||
, fastapi
|
||||
, fetchPypi
|
||||
, gevent
|
||||
, httptools
|
||||
, httpx
|
||||
, isPy3k
|
||||
, pook
|
||||
, pytest-mock
|
||||
, pytestCheckHook
|
||||
, python-magic
|
||||
, pythonOlder
|
||||
, redis
|
||||
, requests
|
||||
, sure
|
||||
, pook
|
||||
, urllib3
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mocket";
|
||||
version = "3.10.9";
|
||||
disabled = !isPy3k;
|
||||
version = "3.11.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-fAVw5WvpJOITQWqA8Y6Xi7QbaunZ1WGXxAuUMXbh+Aw=";
|
||||
hash = "sha256-OIdLP3hHnPZ9MqrHt6G5t2SSO342+jTACgzxM6RjVYM=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
decorator
|
||||
http-parser
|
||||
httptools
|
||||
python-magic
|
||||
urllib3
|
||||
];
|
||||
|
||||
passthru.optional-dependencies = {
|
||||
pook = [
|
||||
pook
|
||||
];
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
pytest-mock
|
||||
aiohttp
|
||||
asgiref
|
||||
fastapi
|
||||
gevent
|
||||
httpx
|
||||
pytest-mock
|
||||
pytestCheckHook
|
||||
redis
|
||||
requests
|
||||
sure
|
||||
pook
|
||||
];
|
||||
] ++ passthru.optional-dependencies.pook;
|
||||
|
||||
# skip http tests
|
||||
# Skip http tests
|
||||
SKIP_TRUE_HTTP = true;
|
||||
pytestFlagsArray = [
|
||||
|
||||
disabledTestPaths = [
|
||||
# Requires a live Redis instance
|
||||
"--ignore=tests/main/test_redis.py"
|
||||
] ++ lib.optionals (pythonOlder "3.8") [
|
||||
# Uses IsolatedAsyncioTestCase which is only available >= 3.8
|
||||
"--ignore=tests/tests38/test_http_aiohttp.py"
|
||||
"tests/main/test_redis.py"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
@ -74,11 +81,14 @@ buildPythonPackage rec {
|
||||
"test_gethostbyname"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "mocket" ];
|
||||
pythonImportsCheck = [
|
||||
"mocket"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A socket mock framework - for all kinds of socket animals, web-clients included";
|
||||
description = "A socket mock framework for all kinds of sockets including web-clients";
|
||||
homepage = "https://github.com/mindflayer/python-mocket";
|
||||
changelog = "https://github.com/mindflayer/python-mocket/releases/tag/${version}";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ hexa ];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user