Subject: python and Could not find platform dependent libraries
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 03/25/2005 22:57:09
Should lang/python/pyversion.mk check if package is installed using
pkg_info instead of just looking for existence of python binary?

I noticed in my FreeBSD bulk builds of pkgsrc many lines of:

 Could not find platform dependent libraries
 Consider setting $PYTHONHOME to [:]
 Could not find platform dependent libraries
 Consider setting $PYTHONHOME to [:]
 Could not find platform dependent libraries
 Consider setting $PYTHONHOME to [:]
....

This appears to be six times after every time it does "marking package
that requires ... as broken" for every package using
lang/python/application.mk.

I can repeat it like:

$ cd ../../editors/lyx-qt/
$ bmake show-var VARNAME=PYTHONBIN
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
/storage1/home/jreed/pkg/bin/python2.3

And I can repeat it with:

$ /storage1/home/jreed/pkg/bin/python2.3 -c 'import distutils.sysconfig;
print distutils.sysconfig.get_python_inc(0, "" ) '
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
include/python2.3

So now I see I only have packages for python15-1.5.2nb3.tgz   and
python20-2.0.1nb10.tgz -- but python2.3 is installed. And python23 was
never registered (and so never deinstalled). This means that it
failed to completly install in the first place.

Well I found the problem for the python23 incomplete install.

But should lang/python/pyversion.mk check if package is installed using
pkg_info instead of just looking for existence of python binary?

(For now, I manually remove the pkg/bin/python2.1 and pkg/bin/python2.3.)

 Jeremy C. Reed

 	  	 	 open source, Unix, *BSD, Linux training
	  	 	 http://www.pugetsoundtechnology.com/