1{
2 lib,
3 buildPythonPackage,
4 click,
5 fetchFromGitHub,
6 pytestCheckHook,
7 pythonOlder,
8 six,
9}:
10
11buildPythonPackage rec {
12 pname = "xdis";
13 version = "6.1.0";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.6";
17
18 src = fetchFromGitHub {
19 owner = "rocky";
20 repo = "python-xdis";
21 rev = "refs/tags/${version}";
22 hash = "sha256-KgKTO99T2/be1sBs5rY3Oy7/Yl9WGgdG3hqqkZ7D7ZY=";
23 };
24
25 propagatedBuildInputs = [
26 click
27 six
28 ];
29
30 nativeCheckInputs = [ pytestCheckHook ];
31
32 pythonImportsCheck = [ "xdis" ];
33
34 disabledTestPaths = [
35 # import file mismatch:
36 # imported module 'test_disasm' has this __file__ attribute:
37 # /build/source/pytest/test_disasm.py
38 # which is not the same as the test file we want to collect:
39 # /build/source/test_unit/test_disasm.py
40 "test_unit/test_disasm.py"
41
42 # Doesn't run on non-2.7 but has global-level mis-import
43 "test_unit/test_dis27.py"
44 ];
45
46 disabledTests = [
47 # AssertionError: events did not match expectation
48 "test_big_linenos"
49 # AssertionError: False is not true : PYTHON VERSION 4.0 is not in magic.magics.keys
50 "test_basic"
51 ];
52
53 meta = with lib; {
54 description = "Python cross-version byte-code disassembler and marshal routines";
55 homepage = "https://github.com/rocky/python-xdis";
56 changelog = "https://github.com/rocky/python-xdis/releases/tag/${version}";
57 license = licenses.gpl2Plus;
58 maintainers = with maintainers; [ onny ];
59 };
60}