aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2024-06-19 03:01:48 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2024-06-19 03:36:42 +0000
commitcf3f032b07e7e538ef61829f16634099bbad223b (patch)
treef95644e9c6e72eab4825e477b0b34d50f953b9a0
parent5fed87320e05d0eb1929966baa8808018cd3d419 (diff)
devel/py-pytest-ruff: New port: PyTest plugin to check ruff requirements
-rw-r--r--devel/Makefile1
-rw-r--r--devel/py-pytest-ruff/Makefile29
-rw-r--r--devel/py-pytest-ruff/distinfo3
-rw-r--r--devel/py-pytest-ruff/pkg-descr4
4 files changed, 37 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 25df53d1de4e..f3816fa3dd2f 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -5543,6 +5543,7 @@
SUBDIR += py-pytest-relaxed
SUBDIR += py-pytest-remotedata
SUBDIR += py-pytest-rerunfailures
+ SUBDIR += py-pytest-ruff
SUBDIR += py-pytest-runner
SUBDIR += py-pytest-services
SUBDIR += py-pytest-shutil
diff --git a/devel/py-pytest-ruff/Makefile b/devel/py-pytest-ruff/Makefile
new file mode 100644
index 000000000000..24644fcf8815
--- /dev/null
+++ b/devel/py-pytest-ruff/Makefile
@@ -0,0 +1,29 @@
+PORTNAME= pytest-ruff
+DISTVERSION= 0.3.2
+CATEGORIES= devel python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= ${PORTNAME:S/-/_/}-${DISTVERSION}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= PyTest plugin to check ruff requirements
+WWW= https://github.com/businho/pytest-ruff
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}poetry-core>=1.0.0:devel/py-poetry-core@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}poetry-dynamic-versioning>0:devel/py-poetry-dynamic-versioning@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=5:devel/py-pytest@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}ruff>=0.0.242:devel/py-ruff@${PY_FLAVOR}
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest-cov>=4.1.0:devel/py-pytest-cov@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytest-mock>=3.10.0:devel/py-pytest-mock@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= pep517 autoplist concurrent pytest
+
+TEST_ENV= PYTHONPATH=${WRKSRC}/src
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/devel/py-pytest-ruff/distinfo b/devel/py-pytest-ruff/distinfo
new file mode 100644
index 000000000000..4e331e8f974b
--- /dev/null
+++ b/devel/py-pytest-ruff/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1718743476
+SHA256 (pytest_ruff-0.3.2.tar.gz) = 8d82882969e52b664a7cef4465cba63e45173f38d907dffeca41d9672f59b6c6
+SIZE (pytest_ruff-0.3.2.tar.gz) = 3881
diff --git a/devel/py-pytest-ruff/pkg-descr b/devel/py-pytest-ruff/pkg-descr
new file mode 100644
index 000000000000..e566b26cd3e2
--- /dev/null
+++ b/devel/py-pytest-ruff/pkg-descr
@@ -0,0 +1,4 @@
+The pytest-ruff plugin will run one ruff check test per file and fail if code
+is not ok for ruff.
+
+Format command only checks for format and fails for formatting errors.