aboutsummaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-07-31 16:27:26 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-07-31 16:39:45 +0000
commitd1d66459c982d366681e67d4c82f2865fbd947ff (patch)
tree2d8c4265fd37ffa1b5af259dbf4da7b88d7a37b7 /devel
parenta6cdb94ccdfa1813df61ea7224caa6534366ee5e (diff)
downloadports-d1d66459c982d366681e67d4c82f2865fbd947ff.tar.gz
ports-d1d66459c982d366681e67d4c82f2865fbd947ff.zip
devel/py-deptry: Add py-deptry 0.12.0
deptry is a command line tool to check for issues with dependencies in a Python project, such as unused or missing dependencies. It supports the following types of projects: - Projects that use Poetry and a corresponding pyproject.toml file - Projects that use PDM and a corresponding pyproject.toml file - Projects that use a requirements.txt file according to the pip standards Dependency issues are detected by scanning for imported modules within all Python files in a directory and its subdirectories, and comparing those to the dependencies listed in the project's requirements.
Diffstat (limited to 'devel')
-rw-r--r--devel/Makefile1
-rw-r--r--devel/py-deptry/Makefile31
-rw-r--r--devel/py-deptry/distinfo3
-rw-r--r--devel/py-deptry/pkg-descr10
4 files changed, 45 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 09af9523dac9..9ecdedabba4e 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4560,6 +4560,7 @@
SUBDIR += py-deprecat
SUBDIR += py-deprecated
SUBDIR += py-deprecation
+ SUBDIR += py-deptry
SUBDIR += py-devtools
SUBDIR += py-dexml2
SUBDIR += py-diazo
diff --git a/devel/py-deptry/Makefile b/devel/py-deptry/Makefile
new file mode 100644
index 000000000000..2b79d65ad1c9
--- /dev/null
+++ b/devel/py-deptry/Makefile
@@ -0,0 +1,31 @@
+PORTNAME= deptry
+PORTVERSION= 0.12.0
+CATEGORIES= devel python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= CLI utility to check for unused, missing and transitive dependencies
+WWW= https://fpgmaas.github.io/deptry/ \
+ https://github.com/fpgmaas/deptry
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}poetry-core>=1.0.0:devel/py-poetry-core@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}chardet>=4.0.0,1:textproc/py-chardet@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}click>=8.0.0<9:devel/py-click@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pathspec>=0.9.0:devel/py-pathspec@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= autoplist concurrent pep517
+
+NO_ARCH= yes
+
+.include <bsd.port.pre.mk>
+
+.if ${PYTHON_REL} < 31100
+RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tomli>=2.0.1<3:textproc/py-tomli@${PY_FLAVOR}
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/devel/py-deptry/distinfo b/devel/py-deptry/distinfo
new file mode 100644
index 000000000000..7117fd014d12
--- /dev/null
+++ b/devel/py-deptry/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1689398765
+SHA256 (deptry-0.12.0.tar.gz) = ac3cd32d149c92a9af12f63cd9486ddd1760f0277ed0cf306c6ef0388f57ff0a
+SIZE (deptry-0.12.0.tar.gz) = 27572
diff --git a/devel/py-deptry/pkg-descr b/devel/py-deptry/pkg-descr
new file mode 100644
index 000000000000..79a4f815cfef
--- /dev/null
+++ b/devel/py-deptry/pkg-descr
@@ -0,0 +1,10 @@
+deptry is a command line tool to check for issues with dependencies in a Python
+project, such as unused or missing dependencies. It supports the following types
+of projects:
+- Projects that use Poetry and a corresponding pyproject.toml file
+- Projects that use PDM and a corresponding pyproject.toml file
+- Projects that use a requirements.txt file according to the pip standards
+
+Dependency issues are detected by scanning for imported modules within all
+Python files in a directory and its subdirectories, and comparing those to the
+dependencies listed in the project's requirements.