2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
, click
|
2022-04-27 09:35:20 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, pytestCheckHook
|
2023-05-24 13:37:59 +00:00
|
|
|
, pythonAtLeast
|
2022-04-27 09:35:20 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, six
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "xdis";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "6.1.0";
|
2022-04-27 09:35:20 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rocky";
|
|
|
|
repo = "python-xdis";
|
2022-12-28 21:21:41 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-KgKTO99T2/be1sBs5rY3Oy7/Yl9WGgdG3hqqkZ7D7ZY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-04-27 09:35:20 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"xdis"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
2024-05-15 15:35:15 +00:00
|
|
|
# import file mismatch:
|
|
|
|
# imported module 'test_disasm' has this __file__ attribute:
|
|
|
|
# /build/source/pytest/test_disasm.py
|
|
|
|
# which is not the same as the test file we want to collect:
|
|
|
|
# /build/source/test_unit/test_disasm.py
|
2022-04-27 09:35:20 +00:00
|
|
|
"test_unit/test_disasm.py"
|
2024-05-15 15:35:15 +00:00
|
|
|
|
|
|
|
# Doesn't run on non-2.7 but has global-level mis-import
|
|
|
|
"test_unit/test_dis27.py"
|
2022-04-27 09:35:20 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
disabledTests = [
|
2022-08-21 13:32:41 +00:00
|
|
|
# AssertionError: events did not match expectation
|
2022-04-27 09:35:20 +00:00
|
|
|
"test_big_linenos"
|
2022-08-21 13:32:41 +00:00
|
|
|
# AssertionError: False is not true : PYTHON VERSION 4.0 is not in magic.magics.keys
|
2022-04-27 09:35:20 +00:00
|
|
|
"test_basic"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python cross-version byte-code disassembler and marshal routines";
|
2022-06-26 10:26:21 +00:00
|
|
|
homepage = "https://github.com/rocky/python-xdis";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/rocky/python-xdis/releases/tag/${version}";
|
2021-03-20 04:20:00 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2022-08-21 13:32:41 +00:00
|
|
|
maintainers = with maintainers; [ onny ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|