at 23.05-pre 1.4 kB view raw
1{ lib 2, buildPythonPackage 3, click 4, fetchFromGitHub 5, fetchpatch 6, pytestCheckHook 7, pythonOlder 8, six 9}: 10 11buildPythonPackage rec { 12 pname = "xdis"; 13 version = "6.0.4"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.6"; 17 18 src = fetchFromGitHub { 19 owner = "rocky"; 20 repo = "python-xdis"; 21 rev = version; 22 hash = "sha256-CRZG898xCwukq+9YVkyXMP8HcuJ9GtvDhy96kxvRFks="; 23 }; 24 25 postPatch = '' 26 # Our Python release is not in the test matrix 27 substituteInPlace xdis/magics.py \ 28 --replace "3.10.4" "3.10.5 3.10.6" 29 ''; 30 31 propagatedBuildInputs = [ 32 click 33 six 34 ]; 35 36 checkInputs = [ 37 pytestCheckHook 38 ]; 39 40 pythonImportsCheck = [ 41 "xdis" 42 ]; 43 44 # import file mismatch: 45 # imported module 'test_disasm' has this __file__ attribute: 46 # /build/source/pytest/test_disasm.py 47 # which is not the same as the test file we want to collect: 48 # /build/source/test_unit/test_disasm.py 49 disabledTestPaths = [ 50 "test_unit/test_disasm.py" 51 ]; 52 53 disabledTests = [ 54 # AssertionError: events did not match expectation 55 "test_big_linenos" 56 # AssertionError: False is not true : PYTHON VERSION 4.0 is not in magic.magics.keys 57 "test_basic" 58 ]; 59 60 meta = with lib; { 61 description = "Python cross-version byte-code disassembler and marshal routines"; 62 homepage = "https://github.com/rocky/python-xdis"; 63 license = licenses.gpl2Plus; 64 maintainers = with maintainers; [ onny ]; 65 }; 66}