Retrieving distribution for py2.6 returns (incompatible) py3 trunk

Bug #576720 reported by brad103
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
waferslim
New
Undecided
Unassigned

Bug Description

Using Buildout to wrap setuptools to obtain pypi packages ordinarily downloads correct versions for the python interpreter that was used. When running buildout under python2.6, waferslim 1.0.2 is retrieved and labelled as waferslim-1.0.2-py2.6.egg. However, it cannot be used in py2.x: the first problem is:

File "d:\dev\eggs\waferslim-1.0.2-py2.6.egg\waferslim\server.py", line 34, in <module>
    import codecs, logging.config, os, socketserver, sys
ImportError: No module named socketserver

This is because in python 2.x, the socketserver module is called SocketServer.

Workaround is to download the zipped source from pypi and make an egg locally, using 2.6. This does however prevent simple use of buildout and setuptools with pypi.

Thanks Tim :)

Tags: cheeseshop
Revision history for this message
tim b (prime8) wrote :

Would like more information: Buildout is retrieving the python3 source not the python2 source.

Oddly, the Cheese Shop has an egg for 2.6 (at http://pypi.python.org/packages/2.6/w/waferslim/waferslim-1.0.2-py2.6.egg) which I would have hoped Buildout could easily find.

Revision history for this message
billy loftus (billy-loftus) wrote :

I am using python 2.7 and I tried to install waferslim 1.0.2. I have same issue described here i.e.

import codecs, logging.config, os, socketserver, sys
ImportError: No module named socketserver

This is because in python 2.7, the socketserver module is called SocketServer. I tried renaming to the correct module name but there are further import issues raised in execution.py

import builtins, logging, re, sys, threading
ImportError: No module named builtins

is there a reported solution or workaround to this issue?

Revision history for this message
brad103 (mail-4brad) wrote :

I'm still using the workaround which is to have a local 'lib' dir with a copy of the 2.6 source.

Revision history for this message
Malcolm McMullen (mwmcmullen) wrote :

This error is also causing me problems.

Which files have to go where with the reported 'workaround'?

Revision history for this message
Malcolm McMullen (mwmcmullen) wrote :

Please note that my issue occurred on the Windows OS and is now fixed. It appears after installing Python26 and adding it's executable to the Environment Variables and then installing setuptools, waferslim would fail after running a fully qualified easy_install of waferslim. After adding C:\Python26\Scripts (where easy_install is) to the Environment Variables, it installed correctly with no problems.

I have absolutely no idea why this is so but I'm happy. Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.