diff options
author | mi <mi@FreeBSD.org> | 2013-01-06 11:30:35 +0800 |
---|---|---|
committer | mi <mi@FreeBSD.org> | 2013-01-06 11:30:35 +0800 |
commit | 176487e9ed9c6ddc13f1bbf7882a75f92b37713d (patch) | |
tree | 330d0f438b2ec94464c1e9d2d4b6b7eaf2b5957e /devel | |
parent | 5d7db156648b4924e7954c00f9fd077645962964 (diff) | |
download | freebsd-ports-gnome-176487e9ed9c6ddc13f1bbf7882a75f92b37713d.tar.gz freebsd-ports-gnome-176487e9ed9c6ddc13f1bbf7882a75f92b37713d.tar.zst freebsd-ports-gnome-176487e9ed9c6ddc13f1bbf7882a75f92b37713d.zip |
Add decompiler for Python's .pyc and .pyo files.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/Makefile | 3 | ||||
-rw-r--r-- | devel/py-uncompyle2/Makefile | 28 | ||||
-rw-r--r-- | devel/py-uncompyle2/distinfo | 2 | ||||
-rw-r--r-- | devel/py-uncompyle2/pkg-descr | 18 | ||||
-rw-r--r-- | devel/py-uncompyle2/pkg-plist | 54 |
5 files changed, 104 insertions, 1 deletions
diff --git a/devel/Makefile b/devel/Makefile index a4744587b71a..5c090c517527 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -332,6 +332,7 @@ SUBDIR += devhelp SUBDIR += devtodo SUBDIR += dfuife-curses + SUBDIR += jgoodies-looks SUBDIR += dia2code SUBDIR += diffuse SUBDIR += ding-libs @@ -1133,7 +1134,6 @@ SUBDIR += log4sh SUBDIR += log4shib SUBDIR += loki - SUBDIR += looks SUBDIR += love SUBDIR += love07 SUBDIR += love5 @@ -3613,6 +3613,7 @@ SUBDIR += py-twistedFlow SUBDIR += py-twistedRunner SUBDIR += py-ujson + SUBDIR += py-uncompyle2 SUBDIR += py-unittest2 SUBDIR += py-unittestplus SUBDIR += py-urlimport diff --git a/devel/py-uncompyle2/Makefile b/devel/py-uncompyle2/Makefile new file mode 100644 index 000000000000..9e5cf06ae178 --- /dev/null +++ b/devel/py-uncompyle2/Makefile @@ -0,0 +1,28 @@ +# Created by: Mikhail Teterin <mi@aldan.algebra.com> +# $FreeBSD$ + +PORTNAME= uncompyle2 +PORTVERSION= 1.1 +CATEGORIES= www +MASTER_SITES= https://github.com/Mysterie/${PORTNAME}/tarball/${HASH}/ +PKGNAMEPREFIX= py- +DISTNAME= Mysterie-${PORTNAME}-${HASH} + +MAINTAINER= mi@aldan.algebra.com +COMMENT= Decompiler for Python's .pyc and .pyo files + +FETCH_ARGS= -Fpr +HASH = 3956a5a +USE_PYTHON= 2.7 +USE_PYDISTUTILS=yes +REINPLACE_ARGS= -i "" + +pre-patch: + # Removing blanks at EOL + ${FIND} ${WRKSRC} -type f -print0 | \ + ${XARGS} -0 ${REINPLACE_CMD} -E 's/[[:blank:]]+$$//g' + +post-install: + ${INSTALL_SCRIPT} ${WRKSRC}/uncompyle2.py ${PREFIX}/bin/uncompyle2 + +.include <bsd.port.mk> diff --git a/devel/py-uncompyle2/distinfo b/devel/py-uncompyle2/distinfo new file mode 100644 index 000000000000..6f8e852cf3da --- /dev/null +++ b/devel/py-uncompyle2/distinfo @@ -0,0 +1,2 @@ +SHA256 (Mysterie-uncompyle2-3956a5a.tar.gz) = 686b24e1b1d1010d1a80153ea1774389a6a37b1fd03e660231a66577e71901af +SIZE (Mysterie-uncompyle2-3956a5a.tar.gz) = 379493 diff --git a/devel/py-uncompyle2/pkg-descr b/devel/py-uncompyle2/pkg-descr new file mode 100644 index 000000000000..59ce2f86f32a --- /dev/null +++ b/devel/py-uncompyle2/pkg-descr @@ -0,0 +1,18 @@ +'uncompyle2' converts Python byte-code back into equivalent Python +source code. It accepts byte-code from Python version 2.5 to 2.7. +Additionally, it will only run on Python 2.7. + +The generated source is very readable: docstrings, lists, tuples and +hashes get pretty-printed. + +Features + + . decompiles Python byte-code into equivalent Python source + . decompiles byte-code from Python version 2.5, 2.6, 2.7 + . pretty-prints docstrings, hashes, lists and tuples + . reads directly from .pyc/.pyo files, bulk-decompile whole + directories + . output may be written to file, a directory or to stdout + . option for including byte-code disassembly into generated source + +WWW: https://github.com/Mysterie/uncompyle2 diff --git a/devel/py-uncompyle2/pkg-plist b/devel/py-uncompyle2/pkg-plist new file mode 100644 index 000000000000..1708ef43e658 --- /dev/null +++ b/devel/py-uncompyle2/pkg-plist @@ -0,0 +1,54 @@ +bin/uncompyle2 +%%PYTHON_SITELIBDIR%%/uncompyle2/__init__.py +%%PYTHON_SITELIBDIR%%/uncompyle2/disas.py +%%PYTHON_SITELIBDIR%%/uncompyle2/magics.py +%%PYTHON_SITELIBDIR%%/uncompyle2/parser.py +%%PYTHON_SITELIBDIR%%/uncompyle2/scanner.py +%%PYTHON_SITELIBDIR%%/uncompyle2/scanner25.py +%%PYTHON_SITELIBDIR%%/uncompyle2/scanner26.py +%%PYTHON_SITELIBDIR%%/uncompyle2/scanner27.py +%%PYTHON_SITELIBDIR%%/uncompyle2/spark.py +%%PYTHON_SITELIBDIR%%/uncompyle2/verify.py +%%PYTHON_SITELIBDIR%%/uncompyle2/walker.py +%%PYTHON_SITELIBDIR%%/uncompyle2/opcode/__init__.py +%%PYTHON_SITELIBDIR%%/uncompyle2/opcode/opcode_23.py +%%PYTHON_SITELIBDIR%%/uncompyle2/opcode/opcode_24.py +%%PYTHON_SITELIBDIR%%/uncompyle2/opcode/opcode_25.py +%%PYTHON_SITELIBDIR%%/uncompyle2/opcode/opcode_26.py +%%PYTHON_SITELIBDIR%%/uncompyle2/opcode/opcode_27.py +%%PYTHON_SITELIBDIR%%/uncompyle2/opcode/__init__.pyc +%%PYTHON_SITELIBDIR%%/uncompyle2/opcode/opcode_23.pyc +%%PYTHON_SITELIBDIR%%/uncompyle2/opcode/opcode_24.pyc +%%PYTHON_SITELIBDIR%%/uncompyle2/opcode/opcode_25.pyc +%%PYTHON_SITELIBDIR%%/uncompyle2/opcode/opcode_26.pyc +%%PYTHON_SITELIBDIR%%/uncompyle2/opcode/opcode_27.pyc +%%PYTHON_SITELIBDIR%%/uncompyle2/opcode/__init__.pyo +%%PYTHON_SITELIBDIR%%/uncompyle2/opcode/opcode_23.pyo +%%PYTHON_SITELIBDIR%%/uncompyle2/opcode/opcode_24.pyo +%%PYTHON_SITELIBDIR%%/uncompyle2/opcode/opcode_25.pyo +%%PYTHON_SITELIBDIR%%/uncompyle2/opcode/opcode_26.pyo +%%PYTHON_SITELIBDIR%%/uncompyle2/opcode/opcode_27.pyo +@dirrm %%PYTHON_SITELIBDIR%%/uncompyle2/opcode +%%PYTHON_SITELIBDIR%%/uncompyle2/__init__.pyc +%%PYTHON_SITELIBDIR%%/uncompyle2/disas.pyc +%%PYTHON_SITELIBDIR%%/uncompyle2/magics.pyc +%%PYTHON_SITELIBDIR%%/uncompyle2/parser.pyc +%%PYTHON_SITELIBDIR%%/uncompyle2/scanner.pyc +%%PYTHON_SITELIBDIR%%/uncompyle2/scanner25.pyc +%%PYTHON_SITELIBDIR%%/uncompyle2/scanner26.pyc +%%PYTHON_SITELIBDIR%%/uncompyle2/scanner27.pyc +%%PYTHON_SITELIBDIR%%/uncompyle2/spark.pyc +%%PYTHON_SITELIBDIR%%/uncompyle2/verify.pyc +%%PYTHON_SITELIBDIR%%/uncompyle2/walker.pyc +%%PYTHON_SITELIBDIR%%/uncompyle2/__init__.pyo +%%PYTHON_SITELIBDIR%%/uncompyle2/disas.pyo +%%PYTHON_SITELIBDIR%%/uncompyle2/magics.pyo +%%PYTHON_SITELIBDIR%%/uncompyle2/parser.pyo +%%PYTHON_SITELIBDIR%%/uncompyle2/scanner.pyo +%%PYTHON_SITELIBDIR%%/uncompyle2/scanner25.pyo +%%PYTHON_SITELIBDIR%%/uncompyle2/scanner26.pyo +%%PYTHON_SITELIBDIR%%/uncompyle2/scanner27.pyo +%%PYTHON_SITELIBDIR%%/uncompyle2/spark.pyo +%%PYTHON_SITELIBDIR%%/uncompyle2/verify.pyo +%%PYTHON_SITELIBDIR%%/uncompyle2/walker.pyo +@dirrm %%PYTHON_SITELIBDIR%%/uncompyle2 |