2008/5/10 Ben Sizer <kyl...@gmail.com>:
No, it's not. See explanation below.
> 2008/5/10 Ben Sizer <kyl...@gmail.com>:
>> On May 10, 12:03 am, "Agustin Villena" <agustin.vill...@gmail.com>
>> wrote:
>>> Better is to link the windows binary egg of simplejson
>>> Available inhttp://files.turbogears.org/eggs/simplejson-1.8.1-py2.5-win32.egg
>>>
>>> easy_installhttp://files.turbogears.org/eggs/simplejson-1.8.1-py2.5-win32.egg
>>>
>>> and then run tgsetup.py
>> Thanks, that appears to have done the trick.
>>
>> Is it possible for someone to fix tgsetup.py so this is done
>> automatically?
No and yes. This is not a problem of tgsetup.py per se, but a problem
with the way easy_install (which is used by tgsetup.py) works:
- TurboGears (or rather TurboJson) has specified "simplejson" as a
requirement.
- There is a new version of simplejson (1.9.1, previous was 1.8.1)
- Even though tgsetup.py uses the -f option to easy_install to tell it
to look for distribution files on http://files.turbogears.org/eggs,
when easy_install searches a package to install, it looks up the
package on PyPI, to determine the newest version.
- As long as the newest version on files.turbogears.org
(simplejson-1.8.1) matches the latest version on PyPI everything is
fine and easy_install downloads & installs the package from
files.turbogears.org.
- But if there is a newer version on PyPI, easy_install ignores the
package on file.turbogears.org. Even if files.turbogears.org has a
binary egg for a package and there is no binary egg for the newer
version on PyPI, easy_install will download the source package for the
newer version from PyPI and try to download, compile and install this.
- At this point, when you don't have a compiler (which is often the case
on Windows), the installation fails.
- As an additional complication, you can not compile simplejson with
Visual Studio, you must compile it with MingW. :-(
Solutions:
a) We need to upload binary eggs for simplejson-1.9.1 for Win, Linux and
OS X to files.turbogears.org. The problem is that things will break
again when the next simplejson release comes out. Still, we will try
to upload new binary eggs asap.
b) We need to host our own PyPI server and adapt tgsetup.py to use this.
We're working on this.
Workarounds:
a) You install and ol version of simplejson from files.turbogears.org
before you run tgsetup.py
b) You install a compiler MingW.
I hope that clears up the matter a bit.
Chris