summaryrefslogtreecommitdiff
path: root/filesystems/py-pyfakefs
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@FreeBSD.org>2024-09-27 12:48:46 +0200
committerRobert Clausecker <fuz@FreeBSD.org>2024-11-06 16:17:35 +0100
commit6e2da9672f79f44048d597f0f61e4646cdeade9d (patch)
treec92e4b3158e3419e8cec38e00227d08dcdaab3e9 /filesystems/py-pyfakefs
parentmath/sdpa: speed up build (diff)
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
Diffstat (limited to 'filesystems/py-pyfakefs')
-rw-r--r--filesystems/py-pyfakefs/Makefile24
-rw-r--r--filesystems/py-pyfakefs/distinfo3
-rw-r--r--filesystems/py-pyfakefs/pkg-descr13
3 files changed, 40 insertions, 0 deletions
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 <bsd.port.mk>
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.