Bug 104560

Summary: [patch] x11-toolkits/py-gtk2 does not configure with python2.5
Product: Ports & Packages Reporter: Vasil Dimov <vd>
Component: Individual Port(s)Assignee: Alexander Botero-Lowry <alexbl>
Status: Closed FIXED    
Severity: Affects Only Me CC: gnome
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Vasil Dimov freebsd_committer freebsd_triage 2006-10-19 08:30:20 UTC
I have Python 2.5 installed and PYTHON_VERSION=python2.5 in
/etc/make.conf:

% ls -ld /var/db/pkg/python*
drwxr-xr-x  2 root  wheel  512 Oct 16 11:50 /var/db/pkg/python-2.5/
drwxr-xr-x  2 root  wheel  512 Oct 16 11:51 /var/db/pkg/python25-2.5_1/
%

% pkg_info -L /var/db/pkg/python25-2.5_1/ |grep bin/python
/usr/local/bin/python2.5
/usr/local/bin/python2.5-config
/usr/local/bin/python-shared2.5
/usr/local/bin/python-shared2.5-config
%

For some reason there is no bin/python.

Then the configure step in x11-toolkits/py-gtk2 fails:

/usr/ports/x11-toolkits/py-gtk2# make configure
[...]
checking for a Python interpreter with version >= 2.3.5... none
configure: error: no suitable Python interpreter found
===>  Script "configure" failed unexpectedly.
[...]

Fix: The following patch to x11-toolkits/py-gtk2 fixes the problem for me:



It may be that bin/python nonexistency is a fault in python25-2.5_1 in
which case, reassign this PR to python@. Or if it is my fault, please
close this PR :)

-- 
Vasil Dimov
gro.DSBeerF@dv
%
A complex system designed from scratch never works and
cannot be patched up to make it work.  You have to start
over, beginning with a working simple system.--0KuoVRucYyb9zN8ELfWP3RU2lCy3aMAqIGXufFQN2XvaZsOw
Content-Type: text/plain; name="py-gtk2.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="py-gtk2.diff"

Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/x11-toolkits/py-gtk2/Makefile,v
retrieving revision 1.89
diff -u -r1.89 Makefile
--- Makefile	18 Oct 2006 18:56:36 -0000	1.89
+++ Makefile	19 Oct 2006 07:18:17 -0000
@@ -31,7 +31,8 @@
 USE_GETTEXT=	yes
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
-		LIBS="-lintl"
+		LIBS="-lintl" \
+		PYTHON="${PYTHON_VERSION}"
 CONFIGURE_ARGS=	--disable-docs
 LDFLAGS+=	-L${LOCALBASE}/lib
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-10-19 08:30:53 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gnome

Over to maintainer
Comment 2 Pav Lucistnik freebsd_committer freebsd_triage 2006-10-19 09:13:45 UTC
Responsible Changed
From-To: gnome->python

Something went horribly wrong with your python ports. I got here: 

$ ls -l /usr/local/bin/python* 
-r-xr-xr-x  2 root  wheel  1022960 17 øíj 11:21 /usr/local/bin/python* 
-r-xr-xr-x  2 root  wheel  1022960 17 øíj 11:21 /usr/local/bin/python2.4* 
-r-xr-xr-x  2 root  wheel     4696 17 øíj 11:21 /usr/local/bin/python-shared* 
-r-xr-xr-x  2 root  wheel     4696 17 øíj 11:21 /usr/local/bin/python-shared2.4*
Comment 3 Alexander Botero-Lowry freebsd_committer freebsd_triage 2006-10-19 10:47:56 UTC
Responsible Changed
From-To: python->gnome

Actually, since Python 2.4 is the default, a link is made to bin/python.
When a non-default version is installed no link is made. This is the expected
behavior, and so the best solution is the original patch supplied by the
submitter.
Comment 4 Pav Lucistnik freebsd_committer freebsd_triage 2006-10-19 12:14:02 UTC
Responsible Changed
From-To: gnome->python

Do I understand it correctly that when user installs _only_ python 2.5, 
he will get no python binary in path? 

Sounds like a seriously flawed approach.
Comment 5 Alexander Botero-Lowry freebsd_committer freebsd_triage 2006-10-19 13:04:44 UTC
Responsible Changed
From-To: python->gnome

That IS the case. It's the approach taken by most other parties.  
The default supported python is installed as python and other 
versions are installed by version.
Comment 6 Pav Lucistnik freebsd_committer freebsd_triage 2006-10-19 13:12:23 UTC
Responsible Changed
From-To: gnome->python

I don't know about 'most other parties', but in FreeBSD Ports Collection, 
all perl and java ports try hard to always provide a non-versioned binary 
to the user.  Please reconsider your attitude here.
Comment 7 Mark Linimon freebsd_committer freebsd_triage 2006-10-23 14:41:03 UTC
Responsible Changed
From-To: python->freebsd-python

Canonicalize. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=104560 

Manually adding to audit trail:

See the maintainer patch in ports/106120.
Comment 8 Vasil Dimov freebsd_committer freebsd_triage 2007-01-23 10:35:51 UTC
Responsible Changed
From-To: freebsd-python->freebsd-ports

The patch in ports/106120 is not from the maintainer (which is gnome@) 
and the PR has been closed without commit. 

Assign this to ports@ since the responsible party is not clear. 
Please do not reassign this from gnome@ to python@ and back without 
coming to a consensus.
Comment 9 Vasil Dimov freebsd_committer freebsd_triage 2007-01-23 11:37:08 UTC
Responsible Changed
From-To: freebsd-ports->freebsd-ports-bugs

Of-course it should have been freebsd-ports-bugs@, sorry.
Comment 10 Alexander Botero-Lowry freebsd_committer freebsd_triage 2007-02-19 04:35:43 UTC
Responsible Changed
From-To: freebsd-ports-bugs->alexbl

I will take it.
Comment 11 Pav Lucistnik freebsd_committer freebsd_triage 2007-03-14 20:56:19 UTC
State Changed
From-To: open->closed

After the mailing list debate in February, I decided this is the way to go wrt 
multiple python version on a same machine. I have checked in this patch.