From 6e2da9672f79f44048d597f0f61e4646cdeade9d Mon Sep 17 00:00:00 2001 From: Robert Clausecker Date: Fri, 27 Sep 2024 12:48:46 +0200 Subject: filesystems: add new category for file systems and related utilities The filesystems category houses file systems and file system utilities. It is added mainly to turn the sysutils/fusefs-* pseudo-category into a proper one, but is also useful for the sundry of other file systems related ports found in the tree. Ports that seem like they belong there are moved to the new category. Two ports, sysutils/fusefs-funionfs and sysutils/fusefs-fusepak are not moved as they currently don't fetch and don't have TIMESTAMP set in their distinfo, but that is required to be able to push a rename of the port by the pre-receive hook. Approved by: portmgr (rene) Reviewed by: mat Pull Request: https://github.com/freebsd/freebsd-ports/pull/302 PR: 281988 --- filesystems/py-pyfakefs/Makefile | 24 ++++++++++++++++++++++++ filesystems/py-pyfakefs/distinfo | 3 +++ filesystems/py-pyfakefs/pkg-descr | 13 +++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 filesystems/py-pyfakefs/Makefile create mode 100644 filesystems/py-pyfakefs/distinfo create mode 100644 filesystems/py-pyfakefs/pkg-descr (limited to 'filesystems/py-pyfakefs') diff --git a/filesystems/py-pyfakefs/Makefile b/filesystems/py-pyfakefs/Makefile new file mode 100644 index 000000000000..5fd0516b932c --- /dev/null +++ b/filesystems/py-pyfakefs/Makefile @@ -0,0 +1,24 @@ +PORTNAME= pyfakefs +PORTVERSION= 5.7.1 +CATEGORIES= filesystems devel python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Implement a fake file system that mocks the Python file system modules +WWW= https://pytest-pyfakefs.readthedocs.io/en/stable/ \ + https://github.com/jmcgeheeiv/pyfakefs + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/COPYING + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}undefined>=0:devel/py-undefined@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist concurrent pep517 pytest + +NO_ARCH= yes + +.include diff --git a/filesystems/py-pyfakefs/distinfo b/filesystems/py-pyfakefs/distinfo new file mode 100644 index 000000000000..d76b6044cd26 --- /dev/null +++ b/filesystems/py-pyfakefs/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1729509154 +SHA256 (pyfakefs-5.7.1.tar.gz) = 24774c632f3b67ea26fd56b08115ba7c339d5cd65655410bca8572d73a1ae9a4 +SIZE (pyfakefs-5.7.1.tar.gz) = 211163 diff --git a/filesystems/py-pyfakefs/pkg-descr b/filesystems/py-pyfakefs/pkg-descr new file mode 100644 index 000000000000..4e82fbb5cd45 --- /dev/null +++ b/filesystems/py-pyfakefs/pkg-descr @@ -0,0 +1,13 @@ +pyfakefs implements a fake file system that mocks the Python file system +modules. Using pyfakefs, your tests operate on a fake file system in memory +without touching the real disk. The software under test requires no modification +to work with pyfakefs. + +Pyfakefs creates a new empty in-memory file system at each test start, which +replaces the real filesystem during the test. Think of pyfakefs as making a +per-test temporary directory, except for an entire file system. + +There are several means to achieve this: by using the fs fixture if running +pytest, by using fake_filesystem_unittest.TestCase as a base class if using +unittest, by using a fake_filesystem_unittest.Patcher instance as a context +manager, or by using the patchfs decorator. -- cgit v1.2.3