Recently i upgraded my OS to Leopard and had to recompile python 2.4.4 for my Zope 3 buildout setup (i need a clean python for that). The problem was, that python 2.4.4 won’t build on leopard, Jodok Batlogg from Lovely Systems had the same problem and instantly found the solution. As he hasn’t posted it to his blog, i will post it here:
add this line to pyconfig.h in the same directory:
1
| #define SETPGRP_HAVE_ARG 1 |
1
2
| ./make
./make install |
that’s it!
Technorati Tags: python, leopard, macosx 10.5
as i had to reinstall my mac book pro after my harddisk has died recently, i post my list of essential packages i need for my developments in Mac OS X. I use Darwin Ports for this of course
1
2
3
4
5
| sudo port install coreutils +with_default_names
sudo port install python24
sudo port install py-celementtree py-checker py-docutils py-eyed3py-feedparser py-geoip py-libxml2 py-mx py-pil py-py2app py-readline py-reverend py-setuptools py-twisted py-unit py-wxpython
sudo port install subversion
sudo port install nmap tor |
If you like to use your arrow keys in an interactive Python on OS X, you definately need readline. But what do you do, when installing py-readline via DarwinPorts doesn’t work??
Today i found this:
I had the same problem. If you download the patch files yourself from ftp://ftp.cwru.edu/pub/bash/readline-5.1-patches (readline51-00[1-4]) and put them in /opt/local/var/db/dports/distfiles/readline, then port install readline will work.
DarwinPorts in Ruby on Rails
this might be useful for other packages which can’t be fetched with the ‘port install <package>’ command
Yahoo now has its own python section in its developer center featuring howto’s and links.
you can see it in the Python Developer Center
there’s also a link to a mailinglist dealing with python access to yahoo webservices
Yahoos Seiten für Software-Entwickler sind um eine Rubrik reicher geworden: Das Python Developer Center lockt Anhänger der objektorientierten Skriptsprache vornehmlich mit einer Reihe von Howto-Artikeln. Darüber hinaus finden sich auf der Seite Links auf andere Ressourcen wie Python-Blogs oder -Tutorials sowie eine Einladung zum Abonnieren einer Mailingliste, die sich mit der Programmierschnittstelle zum Zugriff auf die Yahoo-Web-Services beschäftigt.
heise online – Yahoo! lockt Python-Entwickler
Dependencies
get and install libxml2
download sources for libxml2 and libxslt from http://xmlsoft.org/downloads.html
build and install
1
2
3
| ./configure --with-python=/<pathtoyourpythonbinary>/python
make
sudo make install |
Install kaa
first get kaa from svn:
1
| svn co svn://svn.freevo.org/kaa/trunk kaa |
i had to disable the building of the shared memory module on OS X because it wouldn’t build. As it seems kaa.metadata works without the shared memory module, but maybe someone knows how to get this built on OS X with the shm module.
go into kaa/base and edit setup.py by changing (line 36) this
1
| extensions.append( Extension('shmmodule', ['src/extensions/shmmodule.c']) ) |
to this
1
| #extensions.append( Extension('shmmodule', ['src/extensions/shmmodule.c']) ) |
until now the support for cdrom drives only works on Linux, so i disabled it on OS X.
now go to kaa/metadata and edit setup.py:
change this
1
| ext_modules = [ cdrom, ifoparser ] |
to
1
2
| #ext_modules = [ cdrom, ifoparser ]
ext_modules = [ ifoparser ] |
and change this
1
| ext_modules = [ cdrom ] |
to
1
2
| #ext_modules = [ cdrom ]
ext_modules = [ ] |
now go back to kaa/base and install the kaa.base package:
1
| sudo python setup.py install |
now go to kaa/metadata and install the kaa.metadata package:
1
| sudo python setup.py install |
you may use a different python instance, like /opt/python24/bin/python or something else if you don’t wanna install kaa into the default python on OS X.
I always had the problem, that i could resize (drag with my mouse) images inside kupu, but when i save the document the image has its original size
Today i found the solution to this problem here
To enable kupu to keep the resize information upon save you have to add width and height to the style whitelist in the kupu preferences in your site preferences. Your styles whitelist should look like this:
text-align
list-style-type
float
width
height
that did the trick and now resizing images is working