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