2021-04-05 15:23:46 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-11-21 17:40:18 +00:00
|
|
|
, faker
|
2021-04-05 15:23:46 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, mock
|
2022-06-26 10:26:21 +00:00
|
|
|
, six
|
2021-04-05 15:23:46 +00:00
|
|
|
, pytestCheckHook
|
2022-06-26 10:26:21 +00:00
|
|
|
, pythonOlder
|
2022-11-21 17:40:18 +00:00
|
|
|
, zstd
|
|
|
|
, stdenv
|
2021-04-05 15:23:46 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pymemcache";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "4.0.0";
|
2022-04-27 09:35:20 +00:00
|
|
|
format = "setuptools";
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pinterest";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-11-21 17:40:18 +00:00
|
|
|
hash = "sha256-WgtHhp7lE6StoOBfSy9+v3ODe/+zUC7lGrc2S4M68+M=";
|
2021-04-05 15:23:46 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-11-21 17:40:18 +00:00
|
|
|
faker
|
2021-04-05 15:23:46 +00:00
|
|
|
mock
|
|
|
|
pytestCheckHook
|
2022-11-21 17:40:18 +00:00
|
|
|
zstd
|
2021-04-05 15:23:46 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i "/--cov/d" setup.cfg
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# python-memcached is not available (last release in 2017)
|
|
|
|
"TestClientSocketConnect"
|
2023-02-09 11:40:11 +00:00
|
|
|
] ++ lib.optionals stdenv.is32bit [
|
|
|
|
# test_compressed_complex is broken on 32-bit platforms
|
|
|
|
# this can be removed on the next version bump
|
|
|
|
# see also https://github.com/pinterest/pymemcache/pull/480
|
|
|
|
"test_compressed_complex"
|
2021-04-05 15:23:46 +00:00
|
|
|
];
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pymemcache"
|
|
|
|
];
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python memcached client";
|
|
|
|
homepage = "https://pymemcache.readthedocs.io/";
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|