diff options
author | tg <tg@FreeBSD.org> | 2001-03-01 12:24:24 +0000 |
---|---|---|
committer | tg <tg@FreeBSD.org> | 2001-03-01 12:24:24 +0000 |
commit | 0d4eb737b027cbe0d49dfc783d032ddef4b6359d (patch) | |
tree | ba6c25cc4172d920e429409ce398d3adf144df57 /databases/py-gdbm | |
parent | facc47bf74a02699a46691cac6475e826d86dfbe (diff) | |
download | FreeBSD-ports-0d4eb737b027cbe0d49dfc783d032ddef4b6359d.zip FreeBSD-ports-0d4eb737b027cbe0d49dfc783d032ddef4b6359d.tar.gz |
Use the py-distutils for building and installing.
Diffstat (limited to 'databases/py-gdbm')
-rw-r--r-- | databases/py-gdbm/Makefile | 14 | ||||
-rw-r--r-- | databases/py-gdbm/files/Setup | 5 | ||||
-rw-r--r-- | databases/py-gdbm/files/setup.py | 28 |
3 files changed, 33 insertions, 14 deletions
diff --git a/databases/py-gdbm/Makefile b/databases/py-gdbm/Makefile index 0fe2f43..699a799 100644 --- a/databases/py-gdbm/Makefile +++ b/databases/py-gdbm/Makefile @@ -15,24 +15,20 @@ DISTFILES= ${PYTHON_DISTFILE} MAINTAINER= tg@FreeBSD.org +BUILD_DEPENDS= ${PYDISTUTILS} LIB_DEPENDS= gdbm.2:${PORTSDIR}/databases/gdbm DIST_SUBDIR= python USE_PYTHON= yes WRKSRC= ${PYTHON_WRKSRC}/Modules -CONFIGURE_ENV= PYTHON=${PYTHON_CMD} -ALL_TARGET= sharedmods -MAKE_FLAGS= OPT="${CFLAGS}" post-extract: - @${CP} ${FILESDIR}/Setup ${WRKSRC} - @${CP} ${PYTHON_LIBDIR}/config/Makefile.pre.in ${WRKSRC} + @${CP} ${FILESDIR}/setup.py ${WRKSRC} -do-configure: - @(cd ${WRKSRC}; \ - ${SETENV} ${CONFIGURE_ENV} ${MAKE} -f Makefile.pre.in boot) +do-build: + @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} setup.py build) do-install: - ${INSTALL_DATA} ${WRKSRC}/gdbmmodule.so ${PYTHON_SITELIBDIR} + @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} setup.py install) .include <bsd.port.mk> diff --git a/databases/py-gdbm/files/Setup b/databases/py-gdbm/files/Setup deleted file mode 100644 index 8e4920a..0000000 --- a/databases/py-gdbm/files/Setup +++ /dev/null @@ -1,5 +0,0 @@ -*shared* - -# Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: - -gdbm gdbmmodule.c -I${PREFIX}/include -L${PREFIX}/lib -lgdbm diff --git a/databases/py-gdbm/files/setup.py b/databases/py-gdbm/files/setup.py new file mode 100644 index 0000000..2675fccfb --- /dev/null +++ b/databases/py-gdbm/files/setup.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python +# To use: +# python setup.py install +# + +__version__ = "$FreeBSD$" + +try: + import distutils + from distutils import sysconfig + from distutils.command.install import install + from distutils.core import setup, Extension +except: + raise SystemExit, "Distutils problem" + +prefix = sysconfig.PREFIX +inc_dirs = [prefix + "/include"] +lib_dirs = [prefix + "/lib"] +libs = ["gdbm"] + +setup(name = "gdbm", + description = "GDBM Extension to Python", + + ext_modules = [Extension('gdbm', ['gdbmmodule.c'], + include_dirs = inc_dirs, + libraries = libs, + library_dirs = lib_dirs)] + ) |