2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2024-05-15 15:35:15 +00:00
|
|
|
, pythonOlder
|
2024-01-13 08:15:51 +00:00
|
|
|
, spark-parser
|
2020-04-24 23:36:52 +00:00
|
|
|
, xdis
|
|
|
|
, nose
|
|
|
|
, pytest
|
|
|
|
, hypothesis
|
|
|
|
, six
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "uncompyle6";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "3.9.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-xFHDjrPFzINOuLip5uCwzzIm5NlNCP0nbdA/6RWO2yc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
propagatedBuildInputs = [ spark-parser xdis ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeCheckInputs = [ nose pytest hypothesis six ];
|
|
|
|
|
|
|
|
# Tests attempt to decompile bytecode of the python version
|
|
|
|
# that is running the tests - this does not work for versions
|
|
|
|
# above 3.8, but they decompile older bytecode fine
|
|
|
|
doCheck = pythonOlder "3.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
# six import errors (yet it is supplied...)
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
pytest ./pytest --ignore=pytest/test_function_call.py
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python cross-version byte-code deparser";
|
|
|
|
homepage = "https://github.com/rocky/python-uncompyle6/";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|