Unverified Commit da072948 authored by h7x4's avatar h7x4 Committed by GitHub
Browse files

python3Packages.xdis: 6.1.0 -> 6.1.1, python3Packages.uncompyle6: 3.9.1 -> 3.9.2 (#345128)

parents da8a5a1f 46850407
Loading
Loading
Loading
Loading
+11 −17
Original line number Diff line number Diff line
@@ -6,19 +6,19 @@
  spark-parser,
  xdis,
  nose,
  pytest,
  pytestCheckHook,
  hypothesis,
  six,
}:

buildPythonPackage rec {
  pname = "uncompyle6";
  version = "3.9.1";
  version = "3.9.2";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-xFHDjrPFzINOuLip5uCwzzIm5NlNCP0nbdA/6RWO2yc=";
    hash = "sha256-b3CYD/4IpksRS2hxgy/QLYbJkDX4l2qPH4Eh2tb8pCU=";
  };

  propagatedBuildInputs = [
@@ -28,25 +28,19 @@ buildPythonPackage rec {

  nativeCheckInputs = [
    nose
    pytest
    pytestCheckHook
    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
  # No tests are provided for versions past 3.8,
  # as the project only targets bytecode of versions <= 3.8
  doCheck = pythonOlder "3.9";
  # six import errors (yet it is supplied...)
  checkPhase = ''
    runHook preCheck
    pytest ./pytest --ignore=pytest/test_function_call.py
    runHook postCheck
  '';

  meta = with lib; {
    description = "Python cross-version byte-code deparser";
    homepage = "https://github.com/rocky/python-uncompyle6/";
    license = licenses.gpl3;
  meta = {
    description = "A bytecode decompiler for Python versions 3.8 and below";
    homepage = "https://github.com/rocky/python-uncompyle6";
    license = lib.licenses.gpl3;
    maintainers = with lib.maintainers; [ melvyn2 ];
  };
}
+25 −5
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
  buildPythonPackage,
  click,
  fetchFromGitHub,
  fetchpatch,
  pytestCheckHook,
  pythonOlder,
  six,
@@ -10,7 +11,7 @@

buildPythonPackage rec {
  pname = "xdis";
  version = "6.1.0";
  version = "6.1.1";
  format = "setuptools";

  disabled = pythonOlder "3.6";
@@ -19,9 +20,22 @@ buildPythonPackage rec {
    owner = "rocky";
    repo = "python-xdis";
    rev = "refs/tags/${version}";
    hash = "sha256-KgKTO99T2/be1sBs5rY3Oy7/Yl9WGgdG3hqqkZ7D7ZY=";
    hash = "sha256-Fn1cyUPMrn1SEXl4sdQwJiNHaY+BbxBDz3nKZY965/0=";
  };

  # Backport magics for newer newer python versions
  # 6.1.1 only supports up to 3.12.4 while nixpkgs is already on 3.12.5+
  patches = [
    (fetchpatch {
      url = "https://github.com/rocky/python-xdis/commit/fcba74a7f64c5e2879ca0779ff10f38f9229e7da.patch";
      hash = "sha256-D7eJ97g4G6pmYL/guq0Ndf8yKTVBD2gAuUCAKwvlYbE=";
    })
    (fetchpatch {
      url = "https://github.com/rocky/python-xdis/commit/b66976ff53a2c6e17a73fb7652ddd6c8054df8db.patch";
      hash = "sha256-KO1y0nDTPmEZ+0/3Pjh+CvTdpr/p4AYZ8XdH5J+XzXo=";
    })
  ];

  propagatedBuildInputs = [
    click
    six
@@ -41,6 +55,9 @@ buildPythonPackage rec {

    # Doesn't run on non-2.7 but has global-level mis-import
    "test_unit/test_dis27.py"

    # Has Python 2 style prints
    "test/decompyle/test_nested_scopes.py"
  ];

  disabledTests = [
@@ -50,11 +67,14 @@ buildPythonPackage rec {
    "test_basic"
  ];

  meta = with lib; {
  meta = {
    description = "Python cross-version byte-code disassembler and marshal routines";
    homepage = "https://github.com/rocky/python-xdis";
    changelog = "https://github.com/rocky/python-xdis/releases/tag/${version}";
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ onny ];
    license = lib.licenses.gpl2Plus;
    maintainers = with lib.maintainers; [
      onny
      melvyn2
    ];
  };
}