Import py-fasteners, tweaks/ok jca@
The fasteners module includes the following: Locking decorator Helpful locked decorator (that acquires instance objects lock(s) and acquires on method entry and releases on method exit). Reader-writer locks Multiple readers (at the same time). Single writers (blocking any readers). Helpful read_locked and write_locked decorators. Inter-process locks Single writer using file based locking (these automatically release on process exit, even if __release__ or __exit__ is never called). Helpful interprocess_locked decorator. Generic helpers A try_lock helper context manager that will attempt to acquire a given lock and provide back whether the attempt passed or failed (if it passes, then further code in the context manager will be ran with the lock acquired).
This commit is contained in:
parent
bdbda7777e
commit
ec17b955a7
39
devel/py-fasteners/Makefile
Normal file
39
devel/py-fasteners/Makefile
Normal file
@ -0,0 +1,39 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2017/07/17 00:22:09 danj Exp $
|
||||
|
||||
COMMENT = python package that provides useful locks
|
||||
|
||||
MODPY_EGG_VERSION = 0.14.1
|
||||
DISTNAME = fasteners-${MODPY_EGG_VERSION}
|
||||
PKGNAME = py-${DISTNAME}
|
||||
|
||||
CATEGORIES = devel
|
||||
|
||||
HOMEPAGE = https://github.com/harlowja/fasteners
|
||||
|
||||
# Apache 2.0
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
|
||||
MODULES = lang/python
|
||||
|
||||
MODPY_PI = Yes
|
||||
MODPY_SETUPTOOLS = Yes
|
||||
|
||||
FLAVORS = python3
|
||||
FLAVOR ?=
|
||||
|
||||
RUN_DEPENDS = devel/py-monotonic${MODPY_FLAVOR} \
|
||||
devel/py-six${MODPY_FLAVOR}
|
||||
|
||||
TEST_DEPENDS = ${RUN_DEPENDS} \
|
||||
devel/py-nose${MODPY_FLAVOR} \
|
||||
devel/py-testtools${MODPY_FLAVOR}
|
||||
|
||||
.if !${FLAVOR:Mpython3}
|
||||
TEST_DEPENDS += devel/py-futures
|
||||
.endif
|
||||
|
||||
do-test:
|
||||
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
|
||||
${LOCALBASE}/bin/nosetests${MODPY_BIN_SUFFIX}
|
||||
|
||||
.include <bsd.port.mk>
|
2
devel/py-fasteners/distinfo
Normal file
2
devel/py-fasteners/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (fasteners-0.14.1.tar.gz) = Qnx2dz/gNt36QeV9iQhuoDERu6xXxV/FXzAG0CcQfhg=
|
||||
SIZE (fasteners-0.14.1.tar.gz) = 17749
|
26
devel/py-fasteners/pkg/DESCR
Normal file
26
devel/py-fasteners/pkg/DESCR
Normal file
@ -0,0 +1,26 @@
|
||||
The fasteners module includes the following:
|
||||
|
||||
Locking decorator
|
||||
|
||||
Helpful locked decorator (that acquires instance objects lock(s) and
|
||||
acquires on method entry and releases on method exit).
|
||||
|
||||
Reader-writer locks
|
||||
|
||||
Multiple readers (at the same time). Single writers (blocking any
|
||||
readers). Helpful read_locked and write_locked decorators.
|
||||
|
||||
Inter-process locks
|
||||
|
||||
Single writer using file based locking (these automatically release
|
||||
on process exit, even if __release__ or __exit__ is never called).
|
||||
Helpful interprocess_locked decorator.
|
||||
|
||||
Generic helpers
|
||||
|
||||
A try_lock helper context manager that will attempt to acquire a
|
||||
given lock and provide back whether the attempt passed or failed (if
|
||||
it passes, then further code in the context manager will be ran with
|
||||
the lock acquired).
|
||||
|
||||
|
33
devel/py-fasteners/pkg/PLIST
Normal file
33
devel/py-fasteners/pkg/PLIST
Normal file
@ -0,0 +1,33 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2017/07/17 00:22:09 danj Exp $
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/PKG-INFO
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/SOURCES.txt
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/dependency_links.txt
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/requires.txt
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/top_level.txt
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/__init__.py
|
||||
${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/fasteners/${MODPY_PYCACHE}/
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/${MODPY_PYCACHE}_utils.${MODPY_PYC_MAGIC_TAG}pyc
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/${MODPY_PYCACHE}lock.${MODPY_PYC_MAGIC_TAG}pyc
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/${MODPY_PYCACHE}process_lock.${MODPY_PYC_MAGIC_TAG}pyc
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/${MODPY_PYCACHE}test.${MODPY_PYC_MAGIC_TAG}pyc
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/${MODPY_PYCACHE}version.${MODPY_PYC_MAGIC_TAG}pyc
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/_utils.py
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/lock.py
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/process_lock.py
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/test.py
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/tests/
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/tests/__init__.py
|
||||
${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/fasteners/tests/${MODPY_PYCACHE}/
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/tests/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/tests/${MODPY_PYCACHE}test_decorators.${MODPY_PYC_MAGIC_TAG}pyc
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/tests/${MODPY_PYCACHE}test_helpers.${MODPY_PYC_MAGIC_TAG}pyc
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/tests/${MODPY_PYCACHE}test_lock.${MODPY_PYC_MAGIC_TAG}pyc
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/tests/${MODPY_PYCACHE}test_process_lock.${MODPY_PYC_MAGIC_TAG}pyc
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/tests/test_decorators.py
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/tests/test_helpers.py
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/tests/test_lock.py
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/tests/test_process_lock.py
|
||||
lib/python${MODPY_VERSION}/site-packages/fasteners/version.py
|
Loading…
Reference in New Issue
Block a user