Skip to content

Commit

Permalink
devel/py-ast2json: New port: Convert a python source code into json-d…
Browse files Browse the repository at this point in the history
…umpable AST data
  • Loading branch information
yurivict committed May 19, 2024
1 parent 66a4218 commit 7ac8d57
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions devel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4316,6 +4316,7 @@
SUBDIR += py-aspy.yaml
SUBDIR += py-assertpy
SUBDIR += py-ast-decompiler
SUBDIR += py-ast2json
SUBDIR += py-asteval
SUBDIR += py-astor
SUBDIR += py-astroid
Expand Down
21 changes: 21 additions & 0 deletions devel/py-ast2json/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
PORTNAME= ast2json
DISTVERSION= 0.3
CATEGORIES= devel science
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}

MAINTAINER= yuri@FreeBSD.org
COMMENT= Convert a python source code into json-dumpable AST data
WWW= https://github.com/YoloSwagTeam/ast2json

LICENSE= BSD3CLAUSE

USES= python
USE_PYTHON= distutils # autoplist: autoplist contains the 'test' folder that is removed

NO_ARCH= yes

post-install: # see https://github.com/YoloSwagTeam/ast2json/issues/10
@${RM} -r ${STAGEDIR}${PYTHON_SITELIBDIR}/test

.include <bsd.port.mk>
3 changes: 3 additions & 0 deletions devel/py-ast2json/distinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
TIMESTAMP = 1716080087
SHA256 (ast2json-0.3.tar.gz) = fd40a7d911df8de97eb5976783bf16765fcbe6ce9393fb92aa833283fb5f8ee3
SIZE (ast2json-0.3.tar.gz) = 4369
2 changes: 2 additions & 0 deletions devel/py-ast2json/pkg-descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ast2json is a Python module that allows to convert a python source code into
json-dumpable syntax tree data (dict and lists with strings, ints, ...).
15 changes: 15 additions & 0 deletions devel/py-ast2json/pkg-plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
%%PYTHON_SITELIBDIR%%/ast2json/__init__.py
%%PYTHON_SITELIBDIR%%/ast2json/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
%%PYTHON_SITELIBDIR%%/ast2json/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.pyc
%%PYTHON_SITELIBDIR%%/ast2json/__pycache__/ast2json%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
%%PYTHON_SITELIBDIR%%/ast2json/__pycache__/ast2json%%PYTHON_EXT_SUFFIX%%.pyc
%%PYTHON_SITELIBDIR%%/ast2json/__pycache__/types%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
%%PYTHON_SITELIBDIR%%/ast2json/__pycache__/types%%PYTHON_EXT_SUFFIX%%.pyc
%%PYTHON_SITELIBDIR%%/ast2json/ast2json.py
%%PYTHON_SITELIBDIR%%/ast2json/py2/__init__.py
%%PYTHON_SITELIBDIR%%/ast2json/py2/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
%%PYTHON_SITELIBDIR%%/ast2json/py2/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.pyc
%%PYTHON_SITELIBDIR%%/ast2json/py3/__init__.py
%%PYTHON_SITELIBDIR%%/ast2json/py3/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
%%PYTHON_SITELIBDIR%%/ast2json/py3/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.pyc
%%PYTHON_SITELIBDIR%%/ast2json/types.py

0 comments on commit 7ac8d57

Please sign in to comment.