Date: Wed, 10 Dec 2008 06:52:43 -0800 (PST) From: Silver Salonen <silver.salonen@gmail.com> To: freebsd-ports@freebsd.org Subject: Re: PYTHON_SITELIBDIR gets parsed incorrectly Message-ID: <20936842.post@talk.nabble.com> In-Reply-To: <790a9fff0812100557v105ab514vebef685b02400c18@mail.gmail.com> References: <20930607.post@talk.nabble.com> <790a9fff0812100557v105ab514vebef685b02400c18@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Scot Hetzel wrote: > > On 12/10/08, Silver Salonen <silver.salonen@gmail.com> wrote: >> >> Hello. >> >> I'm creating a port that uses python. I've set in Makefile: >> USE_PYTHON= yes >> PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR:S|^${PREFIX}/||g} >> PLIST_SUB+= PYTHON_SITELIBDIR="${PYTHON_SITELIBDIR}" >> >> And pkg-plist has entries a'la: >> %%BINDINGS%%%%PYTHON_SITELIBDIR%%/ >> >> This %%BINDINGS%% gets replaced with "", so that should not be an issue. >> >> Anyway, when I install port, +CONTENTS contains lines a'la: >> /usr/local/lib/python2.5/site-packages/museek/__init__.py >> >> And when I try deinstalling it, I get errors a'la: >> pkg_delete: file >> '/usr/local//usr/local/lib/python2.5/site-packages/museek/__init__.py' >> doesn't exist >> >> Why do these files get prefixed with $LOCALBASE (or $PREFIX)? >> > > The problem is that you are redefining PYTHON_SITELIBDIR in PLIST_SUB. > If you remove: > >> PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR:S|^${PREFIX}/||g} >> PLIST_SUB+= PYTHON_SITELIBDIR="${PYTHON_SITELIBDIR}" > > from your make file, and use 'make -V PLIST_SUB' and 'make -V > PYTHON_SITELIBDIR', you should get this: > > $ make -V PLIST_SUB > PYVER=2.5 PYVER_WITHPAT=2.5.2 PYTHON_INCLUDEDIR=include/python2.5 > PYTHON_LIBDIR=lib/python2.5 PYTHON_PLATFORM=freebsd8 > PYTHON_SITELIBDIR=lib/python2.5/site-packages > PYTHON_VERSION=python2.5 IF_DEFAULT="" X86_ONLY="@comment " > 32BIT_ONLY="@comment " NO_NIS="" OSREL=8.0 PREFIX=%D > LOCALBASE=/usr/local X11BASE=/usr/local PORTDOCS="" PORTEXAMPLES="" > PORTDATA="" LIB32DIR=lib XAWVER=8 PERL_VERSION=5.8.8 PERL_VER=5.8.8 > PERL_ARCH=mach SITE_PERL=lib/perl5/site_perl/5.8.8 > DOCSDIR="share/doc/python25" EXAMPLESDIR="share/examples/python25" > DATADIR="share/python25" WWWDIR="www/python25" ETCDIR="etc/python25" > > $ make -V PYTHON_SITELIBDIR > /usr/local/lib/python2.5/site-packages > > Scot > Aha, thanks. I didn't realize that %%PYTHON_SITELIBDIR%% gets replaced automatically (via USE_PYTHON=yes, right?). It's OK now :) -- View this message in context: http://www.nabble.com/PYTHON_SITELIBDIR-gets-parsed-incorrectly-tp20930607p20936842.html Sent from the freebsd-ports mailing list archive at Nabble.com.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20936842.post>