aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-04-05 17:07:28 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-04-05 17:29:40 +0000
commitd17af72d4fbb4031c69b983602471ecfdce9e67e (patch)
tree66fc5daacc0f3581c83a3802ac7bb8915280df62
parente732c3906a85f095662b5f73b02e01cdb2d43bd7 (diff)
devel/py-requirements-detector: Add py-requirements-detector 1.1.0
Requirements Detector is a simple Python tool which attempts to find and list the requirements of a Python project. When run from the root of a Python project, it will try to ascertain which libraries and the versions of those libraries that the project depends on. It uses the following methods in order, in the root of the project: 1. Parse setup.py (if this is successful, the remaining steps are skipped) 2. Parse pyproject.yoml (if a tool.poetry.dependencies section is found, the remaining steps are skipped) 3. Parse requirements.txt or requirements.pip 4. Parse all *.txt and *.pip files inside a folder called requirements 5. Parse all files in the root folder matching *requirements*.txt or reqs.txt (so for example, pip_requirements.txt would match, as would requirements_common.txt)
-rw-r--r--devel/Makefile1
-rw-r--r--devel/py-requirements-detector/Makefile26
-rw-r--r--devel/py-requirements-detector/distinfo3
-rw-r--r--devel/py-requirements-detector/pkg-descr15
4 files changed, 45 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 82249aec0465..475d9a92e832 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -5375,6 +5375,7 @@
SUBDIR += py-repoze.xmliter
SUBDIR += py-represent
SUBDIR += py-requestsexceptions
+ SUBDIR += py-requirements-detector
SUBDIR += py-requirementslib
SUBDIR += py-resolvelib
SUBDIR += py-resolvelib05
diff --git a/devel/py-requirements-detector/Makefile b/devel/py-requirements-detector/Makefile
new file mode 100644
index 000000000000..81a9bcc43027
--- /dev/null
+++ b/devel/py-requirements-detector/Makefile
@@ -0,0 +1,26 @@
+PORTNAME= requirements-detector
+PORTVERSION= 1.1.0
+CATEGORIES= devel python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= requirements_detector-${PORTVERSION}
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Find and list requirements of a Python project
+WWW= https://github.com/landscapeio/requirements-detector
+
+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}astroid>=2.0<3.0:devel/py-astroid@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}packaging>=21.3:devel/py-packaging@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}poetry-semver>=0.1.0<0.2.0:devel/py-poetry-semver@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}toml>=0.10.2<0.11.0:textproc/py-toml@${PY_FLAVOR}
+
+USES= python:3.7+
+USE_PYTHON= autoplist concurrent distutils
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/devel/py-requirements-detector/distinfo b/devel/py-requirements-detector/distinfo
new file mode 100644
index 000000000000..455043e45b63
--- /dev/null
+++ b/devel/py-requirements-detector/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1679498500
+SHA256 (requirements_detector-1.1.0.tar.gz) = 246bd23867c12061eadb346a6fe2e616f0b64e681936154a76c494a27cda3ea8
+SIZE (requirements_detector-1.1.0.tar.gz) = 9254
diff --git a/devel/py-requirements-detector/pkg-descr b/devel/py-requirements-detector/pkg-descr
new file mode 100644
index 000000000000..0d5b16675f01
--- /dev/null
+++ b/devel/py-requirements-detector/pkg-descr
@@ -0,0 +1,15 @@
+Requirements Detector is a simple Python tool which attempts to find and list
+the requirements of a Python project.
+
+When run from the root of a Python project, it will try to ascertain which
+libraries and the versions of those libraries that the project depends on.
+
+It uses the following methods in order, in the root of the project:
+ 1. Parse setup.py (if this is successful, the remaining steps are skipped)
+ 2. Parse pyproject.yoml (if a tool.poetry.dependencies section is found, the
+ remaining steps are skipped)
+ 3. Parse requirements.txt or requirements.pip
+ 4. Parse all *.txt and *.pip files inside a folder called requirements
+ 5. Parse all files in the root folder matching *requirements*.txt or reqs.txt
+ (so for example, pip_requirements.txt would match, as would
+ requirements_common.txt)