[tahoe-dev] [tahoe-lafs] #1302: installing Python 3 breaks bin\tahoe on Windows

tahoe-lafs trac at tahoe-lafs.org
Wed Jan 12 08:11:54 UTC 2011


#1302: installing Python 3 breaks bin\tahoe on Windows
----------------------------+-----------------------------------------------
     Reporter:  davidsarah  |       Owner:  somebody                     
         Type:  defect      |      Status:  new                          
     Priority:  major       |   Milestone:  undecided                    
    Component:  packaging   |     Version:  1.8.1                        
   Resolution:              |    Keywords:  windows regression setuptools
Launchpad Bug:              |  
----------------------------+-----------------------------------------------

Comment (by davidsarah):

 This is a regression in Tahoe-LAFS v1.8.0 relative to v1.7.1, caused by
 the fix to #1074. Before v1.8.0, {{{bin\tahoe.exe}}} (built from [http
 ://tahoe-lafs.org/trac/zetuptoolz/browser/trunk/launcher.c?rev=583#L186
 this source]) would have run the Python executable from {{{tahoe-
 script.py}}}'s shebang line, which is the one used for the Tahoe
 build/install, so it would have worked for the same reason as it does from
 a Cygwin prompt.

 So, my bad :-(

 Possible solutions (that don't regress #1074):
 a. Have
 [source:setuptools-0.6c16dev3.egg/setuptools/command/scriptsetup.py
 scriptsetup] associate .pyscript\shell\open\command with the current
 Python interpreter ({{{sys.executable}}} when scriptsetup is run) rather
 than Python.File.
 b. Make {{{tahoe.pyscript}}} work with "any" Python version, but use the
 Python executable from build time to run
 {{{support\Scripts\tahoe.pyscript}}}.
 c. Make {{{bin\tahoe}}} something other than a Python script (for example,
 a .bat or .cmd file).

 Note that a. has the property that if you run build/install with version X
 of Python, then all copies of Tahoe for the current user (since v1.8.0)
 will then use version X, rather than just the one you're
 building/installing. That differs from the behaviour on other operating
 systems or from a Cygwin prompt.

 I think b. is a bad idea; we eventually want to get rid of
 {{{tahoe.pyscript}}} (at least Brian and I do). Also, it imports
 pkg_resources, so pkg_resources would also have to work in Python 3, which
 is impractical/too much work.

 I tested c. with a {{{bin\tahoe.cmd}}} file containing
 {{{
 @C:\Python26\python.exe <full path to renamed tahoe.pyscript> %*
 }}}
 It worked once, and from then on failed silently. (I've seen this
 behaviour before with .cmd and .bat files on my system, and have never got
 to the bottom of it. Perhaps the Windows installation is just broken.)

 In summary, I'm not sure how to fix this yet.

-- 
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1302#comment:1>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-dev mailing list