1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonAtLeast
5, spark_parser
6, xdis
7, nose
8, pytest
9, hypothesis
10, six
11}:
12
13buildPythonPackage rec {
14 pname = "uncompyle6";
15 version = "3.9.0";
16 disabled = pythonAtLeast "3.9"; # See: https://github.com/rocky/python-uncompyle6/issues/331
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-HmqQLeYOpcP30q9+J0UAa05Lm97eiIoH+EQcmTjy7n0=";
21 };
22
23 nativeCheckInputs = [ nose pytest hypothesis six ];
24 propagatedBuildInputs = [ spark_parser xdis ];
25
26 # six import errors (yet it is supplied...)
27 checkPhase = ''
28 runHook preCheck
29 pytest ./pytest --ignore=pytest/test_function_call.py
30 runHook postCheck
31 '';
32
33 meta = with lib; {
34 description = "Python cross-version byte-code deparser";
35 homepage = "https://github.com/rocky/python-uncompyle6/";
36 license = licenses.gpl3;
37 };
38
39}