Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Mar 2024 03:38:58 GMT
From:      Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 9815657e7976 - main - devel/py-pyfakefs: Add py-pyfakefs 5.3.5
Message-ID:  <202403310338.42V3cw3G075810@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9815657e797620996d1276790e3762e4833e9851

commit 9815657e797620996d1276790e3762e4833e9851
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-03-31 03:05:06 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-03-31 03:05:06 +0000

    devel/py-pyfakefs: Add py-pyfakefs 5.3.5
    
    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.
---
 devel/Makefile              |  1 +
 devel/py-pyfakefs/Makefile  | 24 ++++++++++++++++++++++++
 devel/py-pyfakefs/distinfo  |  3 +++
 devel/py-pyfakefs/pkg-descr | 13 +++++++++++++
 4 files changed, 41 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index d7e485d6c5d5..e67c8ff1f605 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -5350,6 +5350,7 @@
     SUBDIR += py-pyee
     SUBDIR += py-pyelftools
     SUBDIR += py-pyface
+    SUBDIR += py-pyfakefs
     SUBDIR += py-pyfcm
     SUBDIR += py-pyflakes
     SUBDIR += py-pyformance
diff --git a/devel/py-pyfakefs/Makefile b/devel/py-pyfakefs/Makefile
new file mode 100644
index 000000000000..15bb37b14aca
--- /dev/null
+++ b/devel/py-pyfakefs/Makefile
@@ -0,0 +1,24 @@
+PORTNAME=	pyfakefs
+PORTVERSION=	5.3.5
+CATEGORIES=	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/devel/py-pyfakefs/distinfo b/devel/py-pyfakefs/distinfo
new file mode 100644
index 000000000000..d22cb346ed93
--- /dev/null
+++ b/devel/py-pyfakefs/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1710603292
+SHA256 (pyfakefs-5.3.5.tar.gz) = 7cdc500b35a214cb7a614e1940543acc6650e69a94ac76e30f33c9373bd9cf90
+SIZE (pyfakefs-5.3.5.tar.gz) = 196773
diff --git a/devel/py-pyfakefs/pkg-descr b/devel/py-pyfakefs/pkg-descr
new file mode 100644
index 000000000000..4e82fbb5cd45
--- /dev/null
+++ b/devel/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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202403310338.42V3cw3G075810>