Date: Tue, 07 Apr 2026 09:58:17 +0000 From: Yuri Victorovich <yuri@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 85fbf348e3ef - main - devel/py-depyf: New port: Decompile and understand Python bytecode from PyTorch Message-ID: <69d4d539.47490.4e41779f@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=85fbf348e3ef734661a3b37f2e298dd120ab9911 commit 85fbf348e3ef734661a3b37f2e298dd120ab9911 Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2026-04-07 04:24:17 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2026-04-07 09:58:08 +0000 devel/py-depyf: New port: Decompile and understand Python bytecode from PyTorch --- devel/Makefile | 1 + devel/py-depyf/Makefile | 30 ++++++++++++++++++++++++++++++ devel/py-depyf/distinfo | 3 +++ devel/py-depyf/files/patch-setup.py | 11 +++++++++++ devel/py-depyf/pkg-descr | 3 +++ 5 files changed, 48 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index 82e8c23bab20..f75c2116cb44 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -4849,6 +4849,7 @@ SUBDIR += py-deprecated SUBDIR += py-deprecation SUBDIR += py-deptry + SUBDIR += py-depyf SUBDIR += py-devtools SUBDIR += py-dexml2 SUBDIR += py-diagnostic diff --git a/devel/py-depyf/Makefile b/devel/py-depyf/Makefile new file mode 100644 index 000000000000..a18bf2eba140 --- /dev/null +++ b/devel/py-depyf/Makefile @@ -0,0 +1,30 @@ +PORTNAME= depyf +DISTVERSION= 0.20.0 +CATEGORIES= devel python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Decompile and understand Python bytecode from PyTorch +WWW= https://github.com/thuml/depyf + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PY_SETUPTOOLS} \ + ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}astor>0:devel/py-astor@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dill>0:devel/py-dill@${PY_FLAVOR} + +USES= python +USE_PYTHON= pep517 autoplist pytest + +NO_ARCH= yes + +TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} \ + PYTHONBREAKPOINT=0 +TEST_WRKSRC= ${WRKSRC}/tests + +# tests as of 0.20.0: 1 passed, 21 warnings in 5.66s + +.include <bsd.port.mk> diff --git a/devel/py-depyf/distinfo b/devel/py-depyf/distinfo new file mode 100644 index 000000000000..428500173330 --- /dev/null +++ b/devel/py-depyf/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1775500352 +SHA256 (depyf-0.20.0.tar.gz) = fb7683bd72c44f67b56029df2c47721e9a02ffa4d7b19095f1c54c4ebf797a98 +SIZE (depyf-0.20.0.tar.gz) = 6168761 diff --git a/devel/py-depyf/files/patch-setup.py b/devel/py-depyf/files/patch-setup.py new file mode 100644 index 000000000000..204e76a40f2f --- /dev/null +++ b/devel/py-depyf/files/patch-setup.py @@ -0,0 +1,11 @@ +--- setup.py.orig 2026-04-06 19:13:32 UTC ++++ setup.py +@@ -11,7 +11,7 @@ def get_git_commit_id(n_digits=8) -> Optional[str]: + # Decode bytes to string (Python 3.x) + commit_id = commit_id.decode('utf-8') + return commit_id[:n_digits] +- except subprocess.CalledProcessError as e: ++ except (subprocess.CalledProcessError, FileNotFoundError, OSError) as e: + print("Failed to get Git commit ID:", e) + return None + diff --git a/devel/py-depyf/pkg-descr b/devel/py-depyf/pkg-descr new file mode 100644 index 000000000000..399903617e26 --- /dev/null +++ b/devel/py-depyf/pkg-descr @@ -0,0 +1,3 @@ +depyf is a Python package for decompiling and understanding Python bytecode. +It helps developers analyze and debug compiled Python code by providing +human-readable representations of bytecode.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69d4d539.47490.4e41779f>
