PYTHON_SITELIBDIR gets parsed incorrectly

2008-12-10 Thread Silver Salonen

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:
%%BINDINGSPYTHON_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)?
-- 
View this message in context: 
http://www.nabble.com/PYTHON_SITELIBDIR-gets-parsed-incorrectly-tp20930607p20930607.html
Sent from the freebsd-ports mailing list archive at Nabble.com.

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: PYTHON_SITELIBDIR gets parsed incorrectly

2008-12-10 Thread Alexey Shuvaev
Hello!

On Wed, Dec 10, 2008 at 12:57:52AM -0800, Silver Salonen 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:
 %%BINDINGSPYTHON_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
 
This is wrong. They should be relative to ${LOCALBASE},
lib/python2.5/site-packages/bla-bla-bla
in this case.
Can't say why %) Examine the behavior of PYTHON_SITELIBDIR variable
in the Makefile.

 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)?
 

0.02$,
Alexey.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: PYTHON_SITELIBDIR gets parsed incorrectly

2008-12-10 Thread Scot Hetzel
On 12/10/08, Silver Salonen [EMAIL PROTECTED] 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:
  %%BINDINGSPYTHON_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
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: PYTHON_SITELIBDIR gets parsed incorrectly

2008-12-10 Thread Silver Salonen


Scot Hetzel wrote:
 
 On 12/10/08, Silver Salonen [EMAIL PROTECTED] 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:
  %%BINDINGSPYTHON_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.

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to [EMAIL PROTECTED]