Are you 10.4 or 10.5? I had nightmares trying to get buildout to work
on 10.4. In the end it was Python header files. In Aspeli's book on
pg 27 he mentions packages named 'python-dev' or similar. I couldn't
find anything for OS X, but did look around the system and found
header files, not surprisingly, in /Library/Frameworks/
Python.framework/Versions/2.4/include/python2.4. Probably rather
dangerously I added this path to PATH in /etc/profile and buildout
worked fine from then on. I'm sure there's a better way, but this
hasn't caused any problems. Hope that helps.
Ben
I did a writeup on this, from Python upwards:
Note that it does *everything* from source.
If you discover any inaccuracies let me know - the whole process was
sufficiently long that I didn't have the energy to follow it all
through again from what I'd written, verifying at each stage!
Cheers,
Dan
--
Dan Fairs <dan....@gmail.com> | http://www.stereoplex.com/
Cool - feel free to ping me if you get stuck. I'd be keen to correct
any errors in the post.
Cheers,
Dan
--
Dan Fairs <dan....@gmail.com> | http://www.stereoplex.com/
What's 'wrong' with the 2.4.4 installer from pythonmac.org/packages/
.... rather than compiling from source from
www.python.org/download/releases/2.4.5/
Is this the one without readline support?
(Beware, mac newbie, I usually install on RHEL!).
Jon Hadley
http://jon-hadley.com
That's the problem - you don't know what's wrong with it :)
Historically, some Linux distros have shipped slightly non-standard
Python builds which have caused problems with Zope. That's why people
on the Zope lists will always tell you to use a Python that you have
compiled yourself from source obtained from python.org - it's a known
quantity.
Compiling Python 2.4.5 from source, on to the next few problems.
'.configure' (with the 10.5 setting) and make both ran fine.
'make install' seemed to run fine, but ended with the following error:
copying build/scripts-2.4/idle -> /usr/local/bin
error: /usr/local/bin/idle: No such file or directory
make: *** [sharedinstall] Error 1
But running 'python2.4' returned no errors .... is this normal? Do I
need IDLE anyway? I ran make install as sudo.
On to the next step, I installed DarwinPorts via the installer ....
but the 'port' command is not recognised via terminal ....... do I
have to go through these steps too?: http://darwinports.com/install/
It's a lot easier in Linux :P
Jon
Hi Jon,
> But running 'python2.4' returned no errors .... is this normal? Do I
> need IDLE anyway? I ran make install as sudo.
>
Hm, not sure about that one - did the script continue after IDLE? If
not, then something else might be broken :)
> On to the next step, I installed DarwinPorts via the installer ....
> but the 'port' command is not recognised via terminal ....... do I
> have to go through these steps too?: http://darwinports.com/install/
>
If you haven't change the configuration of DarwinPorts, the port
command is installed in /opt/local/bin. If that's not on your path,
then you'll probably want to fix that. I blogged about the way Macs
seem to manage their default PATHs here:
(If anyone knows better, tell me!)
> It's a lot easier in Linux :P
>
This bit is! Before I figured some of these things out, I used to run
an Ubuntu VM for the Python stuff. Doing it natively is nicer though,
once you get it set up. I now have parallel python 2.4 and the
(system) python 2.5 installed, and manage development environments
through virtualenv.
I note you've installed Python before installing DarwinPorts, which
means your resultant Python might not have working readline
functionality. Do the arrow keys work for command editing? If so -
what version of Leopard are you running? I'll have to update my post.
Oops .... I got the impression from your guide that you installed
DarwinPorts after 'make install'. My bad.
Is uninstalling python as simple as dropping all the folders in the trash?
Cheers,
Jon Hadley
http://jon-hadley.com
>
>> I note you've installed Python before installing DarwinPorts, which
>> means your resultant Python might not have working readline
>> functionality.
>
> Oops .... I got the impression from your guide that you installed
> DarwinPorts after 'make install'. My bad.
OK - I'll reread the structure and rejig if necessary! Perhaps I
should put an overview of steps at the top.
>
>
> Is uninstalling python as simple as dropping all the folders in the
> trash?
>
If you're planning to build a new python, just go ahead and do it -
the new install will just overwrite the old one.
If not, and you still want to remove the old install - it depends what
you specified on your ./configure line. If you specified a --prefix
option which didn't already exist, then your Python will be the only
thing there and you can junk that. Otherwise, you'll probably have
other stuff in that prefix. In that case, you'll need to remove prefix/
bin/python2.4, prefix/lib/python2.4 and possibly some other stuff.
(I've never actually done that, as you can probably tell!)
make install now finishes with:
Creating directory /usr/local/man
Creating directory /usr/local/man/man1
/usr/bin/install -c -m 644 ./Misc/python.man \
/usr/local/man/man1/python.1
Which seems healthy - but 'Installation successful' would make me a
lot more confident!
Oddly I also couldn't find the 'if do_readline' statement Adreas reffered to.
But Plone 3.1.1 is running happily now from buildout, thanks Dan!
Same here - I think his article is slightly outdated. I should note
that on my article.
>
> But Plone 3.1.1 is running happily now from buildout, thanks Dan!
>
No worries, good to hear that you're up and running.