Averroes / simplejson

MIT License
0 stars 0 forks source link

Installing 2.1.0 egg on OSX (snow leopard) #75

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Install Python 2.4.6 (macports) for OSX 10.6
2. [create a virtualenv] (optional, the result is the same without virtualenv)
3. easy_install simplejson

==== console display ====
Searching for simplejson
Reading http://pypi.python.org/simple/simplejson/
Reading http://undefined.org/python/#simplejson
Best match: simplejson 2.1.0
Downloading
http://pypi.python.org/packages/source/s/simplejson/simplejson-2.1.0.tar.gz#md5=
3ea565fd1216462162c6929b264cf365
Processing simplejson-2.1.0.tar.gz
Running simplejson-2.1.0/setup.py -q bdist_egg --dist-dir
/var/folders/D5/D5kUGxNgGI8-yz5btga6y++++TM/-Tmp-/easy_install-Nkzyb0/simplejson
-2.1.0/egg-dist-tmp-Tc8Djn
No eggs found in
/var/folders/D5/D5kUGxNgGI8-yz5btga6y++++TM/-Tmp-/easy_install-Nkzyb0/simplejson
-2.1.0/egg-dist-tmp-Tc8Djn
(setup script problem?)

==== /console display ====

Note that if I download/expand
http://pypi.python.org/packages/source/s/simplejson/simplejson-2.1.0.tar.gz
Then I just "python setup.py install" it works like a charm.
"pip install simplejson" works perfectly too.

But this is not a solution for me since I install a Plone based site using
zc.buildout and simplejson is a requirement from other eggs.

BTW, googling on that issue shows that others had the same problem with
2.0.9 too (always with Mac OSX 10.6 for what I read).

http://www.coactivate.org/projects/deliverance/lists/deliverance-discussion/arch
ive/2009/12/1260331167397/forum_view

http://permalink.gmane.org/gmane.comp.web.zope.plone.user/106077

Thanks in advance for any help.
-- 
Gilles

Original issue reported on code.google.com by gilles.l...@gmail.com on 25 Mar 2010 at 11:10

GoogleCodeExporter commented 9 years ago
r230

Original comment by bob.ippo...@gmail.com on 31 Mar 2010 at 11:14

GoogleCodeExporter commented 9 years ago
Many thanks for your fast reply but this is not fixed.

I have exactly the same problem with simplejson 2.1.1. Unfortunately I cannot 
"tell"
buildout to use "pip" in place of "easy_install".

My configuration :

Mac OS 10.6, Python 2.4.6 installed with MacPorts, setuptools-0.6c11, pip-0.6.3.

Cheers

Original comment by gilles.l...@gmail.com on 2 Apr 2010 at 4:43

GoogleCodeExporter commented 9 years ago
Works for me. Submit a patch if you have a fix, otherwise I can not help you.

pablo:~ bob$ sudo /usr/bin/easy_install -U simplejsonSearching for simplejson
Reading http://pypi.python.org/simple/simplejson/
Reading http://undefined.org/python/#simplejson
Best match: simplejson 2.1.1
Downloading http://pypi.python.org/packages/source/s/simplejson/simplejson-
2.1.1.tar.gz#md5=0bbe3a2e5e4cac040013733aca159d89
Processing simplejson-2.1.1.tar.gz
Running simplejson-2.1.1/setup.py -q bdist_egg --dist-dir 
/tmp/easy_install-l5GAwl/simplejson-
2.1.1/egg-dist-tmp-dPaUd1
Adding simplejson 2.1.1 to easy-install.pth file

Installed 
/Library/Python/2.6/site-packages/simplejson-2.1.1-py2.6-macosx-10.6-universal.e
gg
Processing dependencies for simplejson
Finished processing dependencies for simplejson
pablo:~ bob$ /usr/bin/python -c 'import simplejson; print simplejson; print 
simplejson.__version__'
<module 'simplejson' from 
'/Library/Python/2.6/site-packages/simplejson-2.1.1-py2.6-macosx-10.6-
universal.egg/simplejson/__init__.pyc'>
2.1.1

Original comment by bob.ippo...@gmail.com on 2 Apr 2010 at 4:46

GoogleCodeExporter commented 9 years ago
Thanks again for your fast reply

I know that simplejson installs like a charm on Python 2.6/OSX 10.6, I got it.

Okay, I'm on Python 2.4.6 and I just read on
http://pypi.python.org/pypi/simplejson/2.1.1 that as of 2.1.1, simplejson 
requires
Python 2.5 or later. But if I install it "the old way" only two tests fail with
Python 2.4.

Using "easy_install simplejson" on a remote Linux box works like a charm.

* I need Python 2.4 because I'm working on a Plone 3 project and I can't easily
switch to Python 2.5 or 2.6.

* This could be setuptools bug that affects only OSX/Python 2.4/setuptool, 
because
"pip install simplejson" works with Python 2.4 but the setuptools maintainer is 
not
as responsive as you are and if it's a confirmed setuptools bug we won't have

I worked around this installing simplejson "the old way" with "python setup.py
install" with the tarball, and using "collective.recipe.mockedeggs" in the 
buildout.

What clean solution do you suggest?

Thanks again.

Original comment by gilles.l...@gmail.com on 3 Apr 2010 at 11:15

GoogleCodeExporter commented 9 years ago
Okay (again). I found a clean workaround using "distribute" in place of 
"setuptools":

$ virtualenv -p /opt/local/bin/python2.4 --distribute --no-site-packages jsonenv
$ source jsonenv/bin/activate
$ easy_install simplejson
...
$ python
Python 2.4.6 (#1, Feb 26 2010, 06:53:46) 
[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import simplejson
>>> simplejson.__file__
'/Users/glenfant/tmp/json/lib/python2.4/site-packages/simplejson-2.1.1-py2.4-mac
osx-10.6-i386.egg/simplejson/__init__.pyc'

Perhaps you should warn about this on simplejson page on pypi site.

Cheers

Original comment by gilles.l...@gmail.com on 3 Apr 2010 at 11:33

GoogleCodeExporter commented 9 years ago
I no longer support Python 2.4 because it's many years old, nearly three major 
versions behind, and I can't be 
bothered to test with it. If you can submit a patch that makes it work without 
breaking for newer versions of 
Python then I'll apply it, but anyone stuck on old versions of Python can use 
old versions of simplejson. As far as 
I'm concerned until that happens the behavior with Python 2.4 is undefined. I 
do clearly state which platforms 
are supported in the description on pypi, google code, and undefined.org.

Original comment by bob.ippo...@gmail.com on 3 Apr 2010 at 2:54

GoogleCodeExporter commented 9 years ago
Pinning to the last known working version 1.7.1 for Python 2.4, fixes this 
issue for me in an easy_install based 
buildout:

[versions]
simplejson = 1.7.1

Original comment by jondatam...@gmail.com on 7 Jun 2010 at 4:09