nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 66 lines 1.4 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 buildPythonPackage, 6 objgraph, 7 psutil, 8 pytestCheckHook, 9 pytest-codspeed, 10 pytest-cov-stub, 11 pythonOlder, 12 setuptools, 13 typing-extensions, 14}: 15 16buildPythonPackage rec { 17 pname = "multidict"; 18 version = "6.7.0"; 19 pyproject = true; 20 21 src = fetchFromGitHub { 22 owner = "aio-libs"; 23 repo = "multidict"; 24 tag = "v${version}"; 25 hash = "sha256-NEiUXHwY7bas7+Ddf9hdR6m/N+wbRG/NguoMROIWjeU="; 26 }; 27 28 postPatch = '' 29 # `python3 -I -c "import multidict"` fails with ModuleNotFoundError 30 substituteInPlace tests/test_circular_imports.py \ 31 --replace-fail '"-I",' "" 32 ''; 33 34 build-system = [ setuptools ]; 35 36 dependencies = lib.optionals (pythonOlder "3.11") [ 37 typing-extensions 38 ]; 39 40 env = lib.optionalAttrs stdenv.cc.isClang { 41 NIX_CFLAGS_COMPILE = "-Wno-error=unused-command-line-argument"; 42 }; 43 44 nativeCheckInputs = [ 45 objgraph 46 psutil 47 pytestCheckHook 48 pytest-codspeed 49 pytest-cov-stub 50 ]; 51 52 preCheck = '' 53 # import from $out 54 rm -r multidict 55 ''; 56 57 pythonImportsCheck = [ "multidict" ]; 58 59 meta = { 60 changelog = "https://github.com/aio-libs/multidict/blob/${src.tag}/CHANGES.rst"; 61 description = "Multidict implementation"; 62 homepage = "https://github.com/aio-libs/multidict/"; 63 license = lib.licenses.asl20; 64 maintainers = with lib.maintainers; [ dotlambda ]; 65 }; 66}