Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Dec 2008 07:57:12 -0600
From:      "Scot Hetzel" <swhetzel@gmail.com>
To:        "Silver Salonen" <silver.salonen@gmail.com>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: PYTHON_SITELIBDIR gets parsed incorrectly
Message-ID:  <790a9fff0812100557v105ab514vebef685b02400c18@mail.gmail.com>
In-Reply-To: <20930607.post@talk.nabble.com>
References:  <20930607.post@talk.nabble.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?790a9fff0812100557v105ab514vebef685b02400c18>