summaryrefslogtreecommitdiff
path: root/devel/py-spwd
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2014-02-13 16:10:50 +0000
committerjperkin <jperkin@pkgsrc.org>2014-02-13 16:10:50 +0000
commit65e09b8017242262457edd7db2d42a763c8fc5d0 (patch)
tree749eae43957c95d5dc96b817bc69573a6543e3e8 /devel/py-spwd
parent98b90e9b271876a251c4d332f73073ef7a53d14c (diff)
downloadpkgsrc-65e09b8017242262457edd7db2d42a763c8fc5d0.tar.gz
Add py-spwd, the spwd module from the Python distribution.
Packaged by Naham Shalman in joyent/pkgsrc#173.
Diffstat (limited to 'devel/py-spwd')
-rw-r--r--devel/py-spwd/DESCR2
-rw-r--r--devel/py-spwd/Makefile26
-rw-r--r--devel/py-spwd/PLIST2
-rw-r--r--devel/py-spwd/files/Setup.in5
-rw-r--r--devel/py-spwd/files/setup.py13
5 files changed, 48 insertions, 0 deletions
diff --git a/devel/py-spwd/DESCR b/devel/py-spwd/DESCR
new file mode 100644
index 00000000000..7033eab9675
--- /dev/null
+++ b/devel/py-spwd/DESCR
@@ -0,0 +1,2 @@
+This module provides access to the Unix shadow password database. It is
+available on most Unix variants.
diff --git a/devel/py-spwd/Makefile b/devel/py-spwd/Makefile
new file mode 100644
index 00000000000..1d6fdde50bb
--- /dev/null
+++ b/devel/py-spwd/Makefile
@@ -0,0 +1,26 @@
+# $NetBSD: Makefile,v 1.1 2014/02/13 16:10:50 jperkin Exp $
+
+PKGNAME= ${PYPKGPREFIX}-spwd-${PY_DISTVERSION}
+CATEGORIES= devel misc python
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://docs.python.org/2/library/spwd.html
+COMMENT= Python module to access the Unix shadow password database
+LICENSE= python-software-foundation
+
+EXTRACT_ELEMENTS= ${PYSUBDIR}/Modules/spwdmodule.c
+
+PYDISTUTILSPKG= yes
+PY_PATCHPLIST= yes
+PYSETUPINSTALLARGS+= --install-lib ${PREFIX}/${PYLIB}/lib-dynload
+
+# ignore errors due to missing files (EXTRACT_ELEMENTS!)
+do-patch:
+ (cd ${WRKSRC}; \
+ for f in ${PATCHDIR}/patch-*;do \
+ ${PATCH} --batch <$$f || ${TRUE}; \
+ done)
+
+.include "../../lang/python/extension.mk"
+.include "../../lang/python/srcdist.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/devel/py-spwd/PLIST b/devel/py-spwd/PLIST
new file mode 100644
index 00000000000..938122776d5
--- /dev/null
+++ b/devel/py-spwd/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2014/02/13 16:10:50 jperkin Exp $
+${PYLIB}/lib-dynload/spwd.so
diff --git a/devel/py-spwd/files/Setup.in b/devel/py-spwd/files/Setup.in
new file mode 100644
index 00000000000..b69fce025b6
--- /dev/null
+++ b/devel/py-spwd/files/Setup.in
@@ -0,0 +1,5 @@
+# $NetBSD: Setup.in,v 1.1 2014/02/13 16:10:50 jperkin Exp $
+#
+*shared*
+spwd spwdmodule.c @BUILDLINK_LDFLAGS@ -R@LOCALBASE@/lib \
+ @BUILDLINK_CPPFLAGS@
diff --git a/devel/py-spwd/files/setup.py b/devel/py-spwd/files/setup.py
new file mode 100644
index 00000000000..0fd7d4853ef
--- /dev/null
+++ b/devel/py-spwd/files/setup.py
@@ -0,0 +1,13 @@
+# $NetBSD: setup.py,v 1.1 2014/02/13 16:10:50 jperkin Exp $
+
+import distutils
+from distutils.core import setup, Extension
+
+setup(
+ ext_modules = [
+ Extension(
+ 'spwd',
+ ['Modules/spwdmodule.c']
+ )
+ ]
+)