Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 337601 - app-admin/eselect-python: doesn't work with Windows targets due to .exe suffix on /usr/bin/python*
Summary: app-admin/eselect-python: doesn't work with Windows targets due to .exe suffi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: x86 Other
: High normal (vote)
Assignee: Python Gentoo Team
URL: http://www.mail-archive.com/gentoo-al...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-16 09:39 UTC by Al
Modified: 2014-01-19 01:59 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch file generate from git (eselect-python.patch,23.39 KB, patch)
2013-05-03 18:30 UTC, mhchiang
Details | Diff
eselect-python.patch (eselect-python.patch,1.69 KB, patch)
2013-05-03 22:29 UTC, mhchiang
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Al 2010-09-16 09:39:43 UTC
/usr/share/eselect/modules/python.eselect doesn't work because the shell expressions don't match the .exe suffix of the python binary.

example: ls "python2.?" doesn't match "python2.6.exe"

There is more of this.

Reproducible: Always

Steps to Reproduce:
Bootstrapping Prefix Python on Cygwin.
Actual Results:  
Error messages. The python sysmlink and python-wrapper are not created.


Possible Solutions:

1.) python2.* doesn't work. Would match python2.6-config, what isn't wanted.

2.) ls python2.?{,.exe} 2>/dev/null (not tested) 

3.) ls python2.?${EXE_SUFFIX} (not tested)

Which way to go? 
In case of 3.) where to set $EXE_SUFFIX, in /usr/share/eselect/libs/eselect or in python.eselect?
Comment 1 Fabian Groffen gentoo-dev 2010-09-16 09:44:08 UTC
chosen way depends actually on what the python team thinks is the best approach
Comment 2 Al 2010-09-24 03:10:00 UTC
Are sed expressions equivalent to a patch? Then here we go. This works on Cygwin. 


file=/usr/share/eselect/modules/python.eselect
sed -i '14 a[[ ${CHOST} == *-cygwin* ]] && EXE_SUFFIX=".exe"' $file
sed -i 's/"\(python[23?][.][?]\)"/"\1${EXE_SUFFIX}"/' $file
Comment 3 SpanKY gentoo-dev 2013-03-22 03:15:30 UTC
(In reply to comment #2)

no.  python.eselect should be renamed to python.eselect.in and use @EXEEXT@ and have config.status output it.
Comment 4 mhchiang 2013-05-03 18:30:38 UTC
Created attachment 347304 [details, diff]
Patch file generate from git
Comment 5 mhchiang 2013-05-03 18:34:46 UTC
(In reply to comment #4)
> Created attachment 347304 [details, diff] [details, diff]
> Patch file generate from git

Sorry for missing the comment.
This patch follows the guide in comment #3 by SpanKY.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-05-03 18:42:19 UTC
Please use '-M' to get clean patch for file moves.
Comment 7 mhchiang 2013-05-03 22:29:04 UTC
Created attachment 347314 [details, diff]
eselect-python.patch

Sorry for the wrong format.
Comment 8 Fabian Groffen gentoo-dev 2014-01-14 19:48:33 UTC
up to python maintainers to decide if they want to do this or not.
Comment 9 Dirkjan Ochtman (RETIRED) gentoo-dev 2014-01-15 08:05:28 UTC
's okay with me, but I'll defer to people who've actually touched eselect-python.
Comment 10 Mike Gilbert gentoo-dev 2014-01-16 03:38:16 UTC
Looks ok to me. I will push it and cut a new release once g.o.g.o is back up.
Comment 11 Mike Gilbert gentoo-dev 2014-01-19 01:59:32 UTC
+*eselect-python-20140115 (19 Jan 2014)
+
+  19 Jan 2014; Mike Gilbert <floppym@gentoo.org>
+  +eselect-python-20140115.ebuild:
+  Version bump, fixes bug 337601.
+