Initial import of python bindings (version 0.2pre1) for fuse and

refuse into the Packages Collection.

	Python bindings for the FUSE and refuse interfaces.

	FUSE allows file sytsem operations to take place at user level, rather
	than in the kernel.  Refuse is a BSD-licensed re-implementation of
	fuse, running on top of the puffs functionality.  This package
	provides a python language interface to the FUSE interface.

	To achieve backwards compatibility with previous versions of the fuse
	bindings for python, set the environment variable

		FUSE_PYTHON_COMPAT=0.1
This commit is contained in:
agc 2007-05-04 19:51:52 +00:00
parent 21a05ef06a
commit a15c26e1f1
6 changed files with 131 additions and 0 deletions

View file

@ -0,0 +1,11 @@
Python bindings for the FUSE and refuse interfaces.
FUSE allows file sytsem operations to take place at user level, rather
than in the kernel. Refuse is a BSD-licensed re-implementation of
fuse, running on top of the puffs functionality. This package
provides a python language interface to the FUSE interface.
To achieve backwards compatibility with previous versions of the fuse
bindings for python, set the environment variable
FUSE_PYTHON_COMPAT=0.1

View file

@ -0,0 +1,30 @@
# $NetBSD: Makefile,v 1.1.1.1 2007/05/04 19:51:52 agc Exp $
#
DISTNAME= fuse-python-0.2pre1-20060720
PKGNAME= ${PYPKGPREFIX}-fuse-bindings-0.2pre1
CATEGORIES= filesystems python
MASTER_SITES= http://bsd.cenkes.org/myports/
EXTRACT_SUFX= .tar.bz2
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://bsd.cenkes.org/myports/
COMMENT= Python bindings for FUSE and refuse
PYSETUP= setup.py
PLIST_SUBST+= PYSITELIB=${PYSITELIB:Q}
USE_TOOLS+= pkg-config
do-build:
cd ${WRKSRC} && ${PYTHONBIN} ${PYSETUP} build
do-install:
cd ${WRKSRC} && ${PYTHONBIN} ${PYSETUP} install
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/fuse-python
${INSTALL_SCRIPT} ${WRKSRC}/example/hello.py ${PREFIX}/share/examples/fuse-python/
${INSTALL_SCRIPT} ${WRKSRC}/example/xmp.py ${PREFIX}/share/examples/fuse-python/
.include "../../lang/python/application.mk"
.include "../../mk/fuse.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -0,0 +1,14 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2007/05/04 19:51:52 agc Exp $
${PYSITELIB}/fuse.py
${PYSITELIB}/fuse.pyc
${PYSITELIB}/fuseparts/__init__.py
${PYSITELIB}/fuseparts/__init__.pyc
${PYSITELIB}/fuseparts/_fusemodule.so
${PYSITELIB}/fuseparts/setcompatwrap.py
${PYSITELIB}/fuseparts/setcompatwrap.pyc
${PYSITELIB}/fuseparts/subbedopts.py
${PYSITELIB}/fuseparts/subbedopts.pyc
share/examples/fuse-python/hello.py
share/examples/fuse-python/xmp.py
@dirrm share/examples/fuse-python
@dirrm ${PYSITELIB}/fuseparts

View file

@ -0,0 +1,19 @@
# $NetBSD: buildlink3.mk,v 1.1.1.1 2007/05/04 19:51:52 agc Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
PY24_FUSE_BINDINGS_BUILDLINK3_MK:= ${PY24_FUSE_BINDINGS_BUILDLINK3_MK}+
.if ${BUILDLINK_DEPTH} == "+"
BUILDLINK_DEPENDS+= py24-fuse-bindings
.endif
BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Npy24-fuse-bindings}
BUILDLINK_PACKAGES+= py24-fuse-bindings
BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}py24-fuse-bindings
.if ${PY24_FUSE_BINDINGS_BUILDLINK3_MK} == "+"
BUILDLINK_API_DEPENDS.py24-fuse-bindings+= py24-fuse-bindings>=0.2pre1
BUILDLINK_PKGSRCDIR.py24-fuse-bindings?= ../../filesystems/py-fuse-bindings
.endif # PY24_FUSE_BINDINGS_BUILDLINK3_MK
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}

View file

@ -0,0 +1,6 @@
$NetBSD: distinfo,v 1.1.1.1 2007/05/04 19:51:52 agc Exp $
SHA1 (fuse-python-0.2pre1-20060720.tar.bz2) = ba96a05d23fe878d42af632bbc359a046e2e1190
RMD160 (fuse-python-0.2pre1-20060720.tar.bz2) = b87ba3ef4859964524c8b5a3573b4549770cf2a4
Size (fuse-python-0.2pre1-20060720.tar.bz2) = 34199 bytes
SHA1 (patch-aa) = e1e6fcd47efcb2965627657f377d78d484294a61

View file

@ -0,0 +1,51 @@
$NetBSD: patch-aa,v 1.1.1.1 2007/05/04 19:51:52 agc Exp $
--- fuseparts/_fusemodule.c 2007/04/29 20:39:47 1.1
+++ fuseparts/_fusemodule.c 2007/04/29 20:42:20
@@ -149,9 +149,15 @@
* and we don't use autotools so we just dare to throw these in as is.
*/
- fetchattr_soft(st, st_rdev);
+#ifdef __NetBSD__
+ st->st_blocks = (st->st_size + 511) / 512;
+ st->st_blksize = 4096;
+ st->st_rdev = st->st_dev;
+#else
fetchattr_soft_d(st, st_blksize, 4096);
fetchattr_soft_d(st, st_blocks, (st->st_size + 511)/512);
+ fetchattr_soft(st, st_rdev);
+#endif
#undef fetchattr_soft
#undef fetchattr_soft_d
@@ -707,6 +713,9 @@
static int
pyfuse_loop_mt(struct fuse *f)
{
+#ifdef __NetBSD__
+ return fuse_loop(f);
+#else
PyInterpreterState *interp;
PyThreadState *save;
int err;
@@ -723,6 +732,7 @@
PyEval_RestoreThread(save);
return(err);
+#endif
}
static struct fuse *fuse=NULL;
@@ -916,7 +926,11 @@
path = PyString_AsString(arg1);
+#ifdef __NetBSD__
+ err = 0;
+#else
err = fuse_invalidate(fuse, path);
+#endif
ret = PyInt_FromLong(err);