python312Packages.depyf: 0.18.0 -> 0.19.0
Diff: https://github.com/thuml/depyf/compare/v0.18.0...v0.19.0 Changelog: https://github.com/thuml/depyf/releases/tag/v0.19.0
This commit is contained in:
@@ -1,20 +1,33 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
|
||||
# build-system
|
||||
setuptools,
|
||||
|
||||
# dependencies
|
||||
astor,
|
||||
dill,
|
||||
filelock,
|
||||
|
||||
# tests
|
||||
pytestCheckHook,
|
||||
torch,
|
||||
pythonAtLeast,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "depyf";
|
||||
version = "0.18.0";
|
||||
version = "0.19.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-uZ8MODvpSa5F1dYG/kRMcfN1tVpXuNayDnhWZw1SEw0=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "thuml";
|
||||
repo = "depyf";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-AGM5Pm0hhqOX9CY7dFijZLqhWmY7xnmKWakh4MUtOMs=";
|
||||
};
|
||||
|
||||
# don't try to read git commit
|
||||
@@ -23,19 +36,51 @@ buildPythonPackage rec {
|
||||
--replace-fail 'commit_id = get_git_commit_id()' 'commit_id = None'
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
build-system = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
astor
|
||||
dill
|
||||
filelock
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
torch
|
||||
];
|
||||
|
||||
disabledTestPaths =
|
||||
[
|
||||
# if self.quitting: raise BdbQuit
|
||||
# E bdb.BdbQuit
|
||||
"tests/test_pytorch/test_pytorch.py"
|
||||
]
|
||||
++ lib.optionals (pythonAtLeast "3.13") [
|
||||
|
||||
# depyf.decompiler.DecompilationError: DecompilationError: Failed to decompile instruction ...
|
||||
# NotImplementedError: Unsupported instruction: LOAD_FAST_LOAD_FAST
|
||||
"tests/test_code_owner.py"
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# E torch._dynamo.exc.BackendCompilerFailed: backend='inductor' raised:
|
||||
# E CppCompileError: C++ compile error
|
||||
"tests/test_pytorch/test_export.py"
|
||||
"tests/test_pytorch/test_logging.py"
|
||||
"tests/test_pytorch/test_simple_graph.py"
|
||||
];
|
||||
|
||||
# All remaining tests fail with:
|
||||
# ValueError: invalid literal for int() with base 10: 'L1'
|
||||
doCheck = !(pythonAtLeast "3.13");
|
||||
|
||||
pythonImportsCheck = [ "depyf" ];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Decompile python functions, from bytecode to source code";
|
||||
homepage = "https://github.com/thuml/depyf";
|
||||
license = licenses.mit;
|
||||
changelog = "https://github.com/thuml/depyf/releases/tag/v${version}";
|
||||
license = lib.licenses.mit;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user