Subject: Who knows the python buildlink infrastructure and could fix a build problem with bittorrent-gui?
To: None <tech-pkg@netbsd.org>
From: Bernd Ernesti <netbsd@lists.veego.de>
List: tech-pkg
Date: 06/22/2004 20:35:21
Hi,

I'm trying to install bittorrent-gui on an nearly empty system.

python23-pth-2.3.4nb2 and py23pth-curses-0nb2 are allready installed, but not
the needed python package: py23pth-cursespanel

Now, doing a make in bittorrent-gui cause this error:

pkgsrc/net/bittorrent-gui> make
=> Checksum OK for BitTorrent-3.4.2.zip.
===> Extracting for bittorrent-gui-3.4.2
===> Required package bittorrent>=3.4: NOT found
===> Verifying reinstall for ../../net/bittorrent
=> Checksum OK for BitTorrent-3.4.2.zip.
===> Extracting for bittorrent-3.4.2
===> Required installed package python23-pth>=2.3: python23-pth-2.3.4nb2 found
===> Required package py23pth-cursespanel-[0-9]*: NOT found
===> Verifying reinstall for ../../devel/py-cursespanel
make: "../../lang/python/../../lang/python/../../lang/python/../../lang/python/pyversion.mk" line 180: Unassociated shell command "error: no valid Python version"
make: "../../lang/python/../../lang/python/../../lang/python/../../lang/python/pyversion.mk" line 187: Could not find /buildlink3.mk
make: Fatal errors encountered -- cannot continue

make: stopped in /pkgsrc/devel/py-cursespanel
*** Error code 1


Installing py23pth-cursespanel before doing the make in bittorrent-gui
'fixed' that problem, but thats not the right solution.

Right now I tracked begining of lang/python/extension.mk which contains that:

# derive a python version from the package name if possible
# optionally handled quoted package names
.if defined(PKGNAME_REQD)
PYTHON_VERSION_REQD?= ${PKGNAME_REQD:C/^[^-]*py([^-]*)-.*/\1/}
.endif

At the point of the error above, PKGNAME_REQD contained bittorrent>=3.4 and
thats of course doesn't have an *py* part in it.
Now, my make(1) knowledge isn't good and so I have to guess:
- line 65 of lang/python/pyversion.mk:
	_PYTHON_VERSION=        ${PYTHON_VERSION_REQD}
  which should contain now 'bittorrent>=3.4'

- so we reach line 180 of lang/python/pyversion.mk, because we couldn't find a
  valid version.

I think we need to fix the check on top of lang/python/extension.mk, but
I don't know whats the best way to do that.

Bernd