From nobody Wed May 22 13:57:29 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VktCs70yFz5LmJc; Wed, 22 May 2024 13:57:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VktCs4ZHBz4CZj; Wed, 22 May 2024 13:57:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716386249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2CmXSQ05Cl22NoUY/wgWGR3ro9b25FBMqyQZTlOz2qA=; b=PuxPUunbPeSGJeDqREzhhTXX5dLa6Eh5Eyb8zi4ELxMc8JoXW/YEa34PHX40HDzFOpuP+P Pr9yr7JrVZBPA47iS3SiqdAEGv+6uvEg8TvHBXwRSyqW2PEnllR20ZSLi06sOLKO/rJPj5 Mzy7wJaWMEZG+CN9AaX85WYn86EHuEdt4CnNX0c1J2gT0mUXm9szto4OQF/CX/V2A+567n /SpEY+5XviPMgmYbxAeMvf3Mdkf/Vs8sXXb+hzaYX0JxY29X7kWo3qCeIQHpkft+je4sfh J6ENR0cuM7ADpr2yVZCX4TRPwFYfG7MyCRjnrHZGeOTltGz4z3x9EoRL4VmyzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716386249; a=rsa-sha256; cv=none; b=f4FX7gfxu4ONZkAB55j2B6ECtDfJ5CE019B6aMzJW+0wcOsM2FO0OMMQlps7D5DBBicEIY XFg+bsLl976RX7JMrjgO9+qv+kgQhce9U4R+Xv1Alddj04lvWgV7JjxWD+zfINtsrCDBCZ CObp46dMfjOrH8rtZplaRlq8YXB2QcYZQpN2aA2Bvrfhd9dZPP2Vtr0U/5ugDsS7bvtQNJ +mFgagVHxBF0FEfAPXxVZ+yczfWylC4hs6X3QsnGy+/X6TeBcIhONmSjKF0tuARcW/oodS pkXax6y1Bxbl+XAF6fMwTg0IO1tMKZmrphDEWoaU2EgBC1LT7+d/XjXBAUxHbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716386249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2CmXSQ05Cl22NoUY/wgWGR3ro9b25FBMqyQZTlOz2qA=; b=bAPVTrodRKJ496n74k6L4t4XuQ2H6AtQk/DHuLIgTmIiZMwuyFZGhJ6HM679s9qDeYtR2Z gYD3Y+Z8y2e9QigawZnsvW7zwlNJiWC6ic2aKckrvZw8o2ctm4wikq//hbYHHQJyBUglK2 IyXeurfHs6AW1Zv1ciItmYgwtyefIxRdO+Y5jOZi8KCIs9DOeiCuiQm7ktdH2AmvtlGCWo pOfIDqn5mAXWtSpOPOFFkoS9SzzLi4814Knsc+U29KT5QR6hSqNyozCp5XlSY6UT/N0jro fCMyrPCEx0+wnf6c2cEPOygnXlB08oMP/Q60XNontLRVKkqs7k22rHDLTIxvAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VktCs2cS0z17N8; Wed, 22 May 2024 13:57:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MDvTCk051020; Wed, 22 May 2024 13:57:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MDvTm8051017; Wed, 22 May 2024 13:57:29 GMT (envelope-from git) Date: Wed, 22 May 2024 13:57:29 GMT Message-Id: <202405221357.44MDvTm8051017@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dave Cottlehuber Subject: git: 5c23643be7e8 - main - textproc/py-grep-ast: new port - grep AST of source files List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dch X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c23643be7e87f18150e95fcd66dfc1891972309 Auto-Submitted: auto-generated The branch main has been updated by dch: URL: https://cgit.FreeBSD.org/ports/commit/?id=5c23643be7e87f18150e95fcd66dfc1891972309 commit 5c23643be7e87f18150e95fcd66dfc1891972309 Author: Dave Cottlehuber AuthorDate: 2024-05-22 13:57:17 +0000 Commit: Dave Cottlehuber CommitDate: 2024-05-22 13:57:17 +0000 textproc/py-grep-ast: new port - grep AST of source files --- textproc/Makefile | 1 + textproc/py-grep-ast/Makefile | 33 +++++++++++++++++++++++++++++++++ textproc/py-grep-ast/distinfo | 3 +++ textproc/py-grep-ast/pkg-descr | 12 ++++++++++++ 4 files changed, 49 insertions(+) diff --git a/textproc/Makefile b/textproc/Makefile index fc1d4d6774f7..505f3ddb7225 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1376,6 +1376,7 @@ SUBDIR += py-gensim SUBDIR += py-gi-docgen SUBDIR += py-grapheme + SUBDIR += py-grep-ast SUBDIR += py-griffe SUBDIR += py-guess-language SUBDIR += py-hashids diff --git a/textproc/py-grep-ast/Makefile b/textproc/py-grep-ast/Makefile new file mode 100644 index 000000000000..a78043b63882 --- /dev/null +++ b/textproc/py-grep-ast/Makefile @@ -0,0 +1,33 @@ +PORTNAME= grep-ast +DISTVERSION= 0.3.2 +CATEGORIES= textproc python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTNAME= grep_ast-${PORTVERSION} + +MAINTAINER= dch@FreeBSD.org +COMMENT= Pythonic grep through AST of source files +WWW= https://github.com/paul-gauthier/grep-ast + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pathspec>=0:devel/py-pathspec@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}tree-sitter-languages>0:devel/py-tree-sitter-languages@${PY_FLAVOR} + +USES= python shebangfix +USE_PYTHON= autoplist concurrent distutils + +NO_ARCH= yes + +PORTDOCS= README.md + +OPTIONS_DEFINE= DOCS + +post-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_MAN} ${PORTDOCS:S|^|${WRKSRC}/|} \ + ${STAGEDIR}${DOCSDIR} + +.include diff --git a/textproc/py-grep-ast/distinfo b/textproc/py-grep-ast/distinfo new file mode 100644 index 000000000000..76296c149aa1 --- /dev/null +++ b/textproc/py-grep-ast/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1716362443 +SHA256 (grep_ast-0.3.2.tar.gz) = d53bc7d25dfefafe77643fec189ab38e3cbd839d546c070a950ebedad82ee164 +SIZE (grep_ast-0.3.2.tar.gz) = 11143 diff --git a/textproc/py-grep-ast/pkg-descr b/textproc/py-grep-ast/pkg-descr new file mode 100644 index 000000000000..96568918b5e2 --- /dev/null +++ b/textproc/py-grep-ast/pkg-descr @@ -0,0 +1,12 @@ +Grep source code files and see matching lines with useful context that +show how they fit into the code. See the loops, functions, methods, +classes, etc that contain all the matching lines. Get a sense of what's +inside a matched class or function definition. You see relevant code from +every layer of the abstract syntax tree, above and below the matches. + +By default, grep-AST recurses the current directory to search all source +code files. It respects .gitignore, so it will usually "do the right +thing" in most repos if you just do grep-ast without specifying +any filenames. + +You can also invoke grep-ast as gast for convenience.