diff --git a/devel/Makefile b/devel/Makefile index 82249aec04653d3b39920293fa169bb5293f2cc2..475d9a92e83265a2b466a1e9ce71c289f5f09fda 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 0000000000000000000000000000000000000000..81a9bcc43027552ab4c31b5e62594b42724caa65 --- /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 0000000000000000000000000000000000000000..455043e45b63ef2e3e734703a6f880b6ce18942b --- /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 0000000000000000000000000000000000000000..0d5b16675f0104c1b32bb440093cd867c4b7afb0 --- /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)