devel/py-xasm: Add py-xasm 1.2.0

The Python xasm module has routines for assembly, and has a command to assemble
bytecode for several different versions of Python.

Here are some potential uses:
- Make small changes to existing Python bytecode when you don't have source
- Craft custom and efficient bytecode
- Write an instruction-level optimizing compiler
- Experiment with and learn about Python bytecode
- Foil decompilers like uncompyle6 so that they can't disassemble bytecode (at
  least for now)

This support the same kinds of bytecode that xdis supports. This is pretty much
all released bytecode, although we tend to lag behind the latest Python
releases.
This commit is contained in:
Po-Chuan Hsieh 2024-08-05 00:44:05 +08:00
parent 1085cb6005
commit a9619e5670
No known key found for this signature in database
GPG key ID: 9A4BD10F002DD04B
5 changed files with 60 additions and 0 deletions

View file

@ -6023,6 +6023,7 @@
SUBDIR += py-xarray SUBDIR += py-xarray
SUBDIR += py-xarray-einstats SUBDIR += py-xarray-einstats
SUBDIR += py-xarray-simlab SUBDIR += py-xarray-simlab
SUBDIR += py-xasm
SUBDIR += py-xattr SUBDIR += py-xattr
SUBDIR += py-xdg SUBDIR += py-xdg
SUBDIR += py-xdis SUBDIR += py-xdis

25
devel/py-xasm/Makefile Normal file
View file

@ -0,0 +1,25 @@
PORTNAME= xasm
PORTVERSION= 1.2.0
CATEGORIES= devel python
MASTER_SITES= PYPI \
https://github.com/rocky/python-xasm/releases/download/${PORTVERSION}/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Python cross-version byte-code assembler
WWW= https://github.com/rocky/python-xasm
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/LICENSE.gpl2
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}xdis>=6.0.3:devel/py-xdis@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>=1.10.0:devel/py-six@${PY_FLAVOR}
USES= python
USE_PYTHON= autoplist concurrent pep517
NO_ARCH= yes
.include <bsd.port.mk>

3
devel/py-xasm/distinfo Normal file
View file

@ -0,0 +1,3 @@
TIMESTAMP = 1722711125
SHA256 (xasm-1.2.0.tar.gz) = 800ed4d0e2b582fa85c39362ea2958020b8fe48e96d13c2f0895c7f7b1f5f81f
SIZE (xasm-1.2.0.tar.gz) = 39887

View file

@ -0,0 +1,17 @@
--- __pkginfo__.py.orig 2021-11-07 21:37:38 UTC
+++ __pkginfo__.py
@@ -35,12 +35,12 @@ ftp_url = None
author = "Rocky Bernstein"
author_email = "rb@dustyfeet.com"
ftp_url = None
-install_requires = [_six]
+install_requires = ["xdis >= 6.0.3"]
license = "GPL-2.0"
mailing_list = "python-debugger@googlegroups.com"
modname = "xasm"
py_modules = None
-setup_requires = ["pytest-runner", "xdis >= 6.0.3, < 6.1.0"]
+setup_requires = []
# scripts = ['bin/pydisasm']
short_desc = "Python cross-version byte-code assembler"
tests_require = ["pytest", _six]

14
devel/py-xasm/pkg-descr Normal file
View file

@ -0,0 +1,14 @@
The Python xasm module has routines for assembly, and has a command to assemble
bytecode for several different versions of Python.
Here are some potential uses:
- Make small changes to existing Python bytecode when you don't have source
- Craft custom and efficient bytecode
- Write an instruction-level optimizing compiler
- Experiment with and learn about Python bytecode
- Foil decompilers like uncompyle6 so that they can't disassemble bytecode (at
least for now)
This support the same kinds of bytecode that xdis supports. This is pretty much
all released bytecode, although we tend to lag behind the latest Python
releases.