git: 639cb7d4f538 - main - devel/py-scantree: New port: flexible recursive directory iterator

From: Jose Alonso Cardenas Marquez <acm_at_FreeBSD.org>
Date: Thu, 20 Apr 2023 02:22:16 UTC
The branch main has been updated by acm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=639cb7d4f5381b3ba2ec5a2c62278c2cf5c7e763

commit 639cb7d4f5381b3ba2ec5a2c62278c2cf5c7e763
Author:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
AuthorDate: 2023-04-20 02:20:36 +0000
Commit:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
CommitDate: 2023-04-20 02:21:58 +0000

    devel/py-scantree: New port: flexible recursive directory iterator
    
    Recursive directory iterator supporting:
    
    - flexible filtering including wildcard path matching
    - in memory representation of file-tree (for repeated access)
    - efficient access to directory entry properties (posix.DirEntry interface)
      extended with real path and path relative to the recursion root directory
    - detection and handling of cyclic symlinks
---
 devel/Makefile              |  1 +
 devel/py-scantree/Makefile  | 23 +++++++++++++++++++++++
 devel/py-scantree/distinfo  |  3 +++
 devel/py-scantree/pkg-descr |  7 +++++++
 4 files changed, 34 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 0d863c5f3427..c63a9ff332d3 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -5440,6 +5440,7 @@
     SUBDIR += py-saneyaml
     SUBDIR += py-sarge
     SUBDIR += py-sarif-om
+    SUBDIR += py-scantree
     SUBDIR += py-schedule
     SUBDIR += py-scheduler
     SUBDIR += py-schema
diff --git a/devel/py-scantree/Makefile b/devel/py-scantree/Makefile
new file mode 100644
index 000000000000..5f0acbec63e6
--- /dev/null
+++ b/devel/py-scantree/Makefile
@@ -0,0 +1,23 @@
+PORTNAME=	scantree
+DISTVERSION=	0.0.1
+CATEGORIES=	devel python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	acm@FreeBSD.org
+COMMENT=	flexible recursive directory iterator
+WWW=		https://github.com/andhus/scantree
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}attrs>0:devel/py-attrs@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}scandir>0:sysutils/py-scandir@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pathlib2>0:devel/py-pathlib2@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pathspec>0:devel/py-pathspec@${PY_FLAVOR}
+
+USES=		python:3.7+
+USE_PYTHON=	autoplist distutils
+
+.include <bsd.port.mk>
diff --git a/devel/py-scantree/distinfo b/devel/py-scantree/distinfo
new file mode 100644
index 000000000000..26377d0f044c
--- /dev/null
+++ b/devel/py-scantree/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1681956449
+SHA256 (scantree-0.0.1.tar.gz) = 2a8b163de0e4b2f9e4f37f8caf3f0b265172bbf174111e1bebc7955581895b39
+SIZE (scantree-0.0.1.tar.gz) = 13449
diff --git a/devel/py-scantree/pkg-descr b/devel/py-scantree/pkg-descr
new file mode 100644
index 000000000000..666265a088ab
--- /dev/null
+++ b/devel/py-scantree/pkg-descr
@@ -0,0 +1,7 @@
+Recursive directory iterator supporting:
+
+- flexible filtering including wildcard path matching
+- in memory representation of file-tree (for repeated access)
+- efficient access to directory entry properties (posix.DirEntry interface)
+  extended with real path and path relative to the recursion root directory
+- detection and handling of cyclic symlinks