diff options
author | Thomas Gellekum <tg@FreeBSD.org> | 2001-03-01 12:24:24 +0000 |
---|---|---|
committer | Thomas Gellekum <tg@FreeBSD.org> | 2001-03-01 12:24:24 +0000 |
commit | ed3bc16bc4c5f489b439c3b4f9c5e42b6a731dd4 (patch) | |
tree | cbe8b754ea48cc7d22ada76867a6ed6f3b90bd7f | |
parent | 80d3dac31c3678282ddc342252ff57003aaa85fe (diff) | |
download | ports-ed3bc16bc4c5f489b439c3b4f9c5e42b6a731dd4.tar.gz ports-ed3bc16bc4c5f489b439c3b4f9c5e42b6a731dd4.zip |
Notes
-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 | ||||
-rw-r--r-- | x11-toolkits/py-tkinter/Makefile | 14 | ||||
-rw-r--r-- | x11-toolkits/py-tkinter/files/Setup | 8 | ||||
-rw-r--r-- | x11-toolkits/py-tkinter/files/setup.py | 40 |
6 files changed, 78 insertions, 31 deletions
diff --git a/databases/py-gdbm/Makefile b/databases/py-gdbm/Makefile index 0fe2f43dbfcd..699a799b87ca 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 8e4920a954c7..000000000000 --- 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 000000000000..2675fccfb954 --- /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)] + ) diff --git a/x11-toolkits/py-tkinter/Makefile b/x11-toolkits/py-tkinter/Makefile index 0c1e5dcd1350..cca76405fb7a 100644 --- a/x11-toolkits/py-tkinter/Makefile +++ b/x11-toolkits/py-tkinter/Makefile @@ -15,24 +15,20 @@ DISTFILES= ${PYTHON_DISTFILE} MAINTAINER= tg@FreeBSD.org +BUILD_DEPENDS= ${PYDISTUTILS} LIB_DEPENDS= tk83.1:${PORTSDIR}/x11-toolkits/tk83 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}/_tkinter.so ${PYTHON_SITELIBDIR} + @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} setup.py install) .include <bsd.port.mk> diff --git a/x11-toolkits/py-tkinter/files/Setup b/x11-toolkits/py-tkinter/files/Setup deleted file mode 100644 index 6a90582bf2da..000000000000 --- a/x11-toolkits/py-tkinter/files/Setup +++ /dev/null @@ -1,8 +0,0 @@ -*shared* - -# The _tkinter module. -# -# The TKPATH variable is always enabled, to save you the effort. -TKPATH=:lib-tk - -_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT -I${X11BASE}/include -I${PREFIX}/include/tcl8.3 -I${PREFIX}/include/tk8.3 -L${PREFIX}/lib -ltk83 -ltcl83 -L${X11BASE}/lib -lX11 diff --git a/x11-toolkits/py-tkinter/files/setup.py b/x11-toolkits/py-tkinter/files/setup.py new file mode 100644 index 000000000000..f977531b6810 --- /dev/null +++ b/x11-toolkits/py-tkinter/files/setup.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python +# To use: +# python setup.py install +# + +__version__ = "$FreeBSD$" + +import os, string + +try: + import distutils + from distutils import sysconfig + from distutils.command.install import install + from distutils.core import setup, Extension +except: + raise SystemExit, "Distutils problem" + +tkversion = "8.3" +prefix = sysconfig.PREFIX +# Python 1.5 doesn't have os.getenv()? +x11base = os.environ['X11BASE'] or '/usr/X11R6' +inc_dirs = [prefix + "/include", + prefix + "/include/tcl" + tkversion, + prefix + "/include/tk" + tkversion, + x11base + "/include"] +lib_dirs = [prefix + "/lib", x11base + "/lib"] +# use string.replace() for the benefit of Python 1.5 users +libs = ["tcl" + string.replace(tkversion, ".", ""), + "tk" + string.replace(tkversion, ".", ""), + "X11"] + +setup(name = "Tkinter", + description = "Tk Extension to Python", + + ext_modules = [Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'], + define_macros=[('WITH_APPINIT', 1)], + include_dirs = inc_dirs, + libraries = libs, + library_dirs = lib_dirs)] + ) |