Buildout on OS X - can't get it to work. Too many Pythons?

0 views
Skip to first unread message

frs...@gmail.com

unread,
May 14, 2008, 3:49:28 AM5/14/08
to Plone Users Wessex
Give neveryone tells me I should use Buildout, I gave it a go
yesterday. I set my system path to point at Python 2.4.4, I followed
the tutorial at http://plone.org/documentation/tutorial/buildout
and... I got nowhere. Something it not right. (And when I gave up and
just installed 3.0.6 from the dmg and used easy_install
Products.Ploneboard that borked Plone (which it didn't before).

So pretty much stuck.

Any of you set up Buildout on the Mac? and can give me a heads up as
to what I need to do to get it working?

F.

Ben Glynn

unread,
May 14, 2008, 5:28:47 AM5/14/08
to plone-use...@googlegroups.com
Morning

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

Dan Fairs

unread,
May 14, 2008, 2:35:10 PM5/14/08
to plone-use...@googlegroups.com
> Any of you set up Buildout on the Mac? and can give me a heads up as
> to what I need to do to get it working?


I did a writeup on this, from Python upwards:

http://www.stereoplex.com/two-voices/creating-a-python-2-4-plone-and-zope-development-environment-on-mac-os-x-leopard

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/

frs...@gmail.com

unread,
May 15, 2008, 9:20:28 AM5/15/08
to Plone Users Wessex
Thanks Dan and Ben for the hints - I'll try out Dan's how-to now.

F.

On 14 May, 19:35, Dan Fairs <dan.fa...@gmail.com> wrote:
> > Any of you set up Buildout on the Mac? and can give me a heads up as
> > to what I need to do to get it working?
>
> I did a writeup on this, from Python upwards:
>
>    http://www.stereoplex.com/two-voices/creating-a-python-2-4-plone-and-...
>
> 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.fa...@gmail.com> |http://www.stereoplex.com/

Dan Fairs

unread,
May 15, 2008, 10:25:44 AM5/15/08
to plone-use...@googlegroups.com
>
> Thanks Dan and Ben for the hints - I'll try out Dan's how-to now.


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/

frs...@gmail.com

unread,
May 15, 2008, 10:56:07 AM5/15/08
to Plone Users Wessex
On 15 May, 15:25, Dan Fairs <dan.fa...@gmail.com> wrote:
> > Thanks Dan and Ben for the hints - I'll try out Dan's how-to now.
>
> Cool - feel free to ping me if you get stuck. I'd be keen to correct  
> any errors in the post.

No need - it worked. Actually I skipped a few steps... used Python
2.4.4 from another install. I might go back and do it properly a bit
later. I think the virtualenv was one of the key things, since I did
suspect I was suffering from too many pythons.

F.

Jon Hadley

unread,
May 30, 2008, 1:10:44 PM5/30/08
to plone-use...@googlegroups.com
> No need - it worked. Actually I skipped a few steps... used Python
> 2.4.4 from another install.

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

Dan Fairs

unread,
May 31, 2008, 8:25:22 AM5/31/08
to plone-use...@googlegroups.com

>
>> No need - it worked. Actually I skipped a few steps... used Python
>> 2.4.4 from another install.
>
> 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?
>

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.

Jon Hadley

unread,
Jun 3, 2008, 3:47:39 AM6/3/08
to plone-use...@googlegroups.com
OK...

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

Dan Fairs

unread,
Jun 3, 2008, 3:57:13 AM6/3/08
to plone-use...@googlegroups.com
>

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:

http://www.stereoplex.com/two-voices/mac-os-x-command-and-manual-search-path-path-and-manpath-for-man

(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.

Jon Hadley

unread,
Jun 3, 2008, 4:06:22 AM6/3/08
to plone-use...@googlegroups.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.

Is uninstalling python as simple as dropping all the folders in the trash?

Cheers,

Jon Hadley
http://jon-hadley.com

Dan Fairs

unread,
Jun 3, 2008, 5:27:16 AM6/3/08
to plone-use...@googlegroups.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!)

Jon Hadley

unread,
Jun 3, 2008, 5:52:47 AM6/3/08
to plone-use...@googlegroups.com
Got to the bottom of the directory install errors, these already
existed from a prior installtion. rm -rf 'ing them fixed things.

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!

Dan Fairs

unread,
Jun 3, 2008, 5:57:34 AM6/3/08
to plone-use...@googlegroups.com
>
> Oddly I also couldn't find the 'if do_readline' statement Adreas
> reffered to.

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.

Reply all
Reply to author
Forward
0 new messages