No distutils? Install Xcode
I’m putting up a quick note because I just spent half an hour trying to track down why Mailman 2.1.12 would not configure. The obvious Google searches came up with nothing. Configure kept telling me that Distutils was not available. But distutils was available. The real problem is that I didn’t have some of the Python header files that Mailman needs. The solution to “Distutils is not available” on Mac OS X Leopard is to install Xcode.
[toggle code]
- ./configure --prefix=/usr/share/mailman --with-var-prefix=/var/mailman
- checking for --with-python... no
- checking for python... /usr/bin/python
- checking Python interpreter... /usr/bin/python
- checking Python version... 2.5.1
- checking Python's email package... ok
- checking that Python has a working distutils... configure: error:
- ***** Distutils is not available or is incomplete for /usr/bin/python
- ***** If you installed Python from RPM (or other package manager)
- ***** be sure to install the -devel package, or install Python
- ***** from source. See sec. 15.1 of the Installation Manual for
- ***** details
Also, for future reference, here is the upgrade process I followed for upgrading Mailman from 2.1.9 to 2.1.12 on Mac OS X Server 10.5.6:
[toggle code]
-
#configure and make Mailman
- ./configure --prefix=/usr/share/mailman --with-var-prefix=/var/mailman
- make
-
#stop processes
- sudo /bin/launchctl unload -w /System/Library/LaunchDaemons/org.postfix.master.plist
- sudo serveradmin stop web
- sudo /usr/share/mailman/bin/mailmanctl stop
-
#backup data
- sudo tar -cvf mailman2.1.9.tar /usr/share/mailman
- sudo rsync --archive --delete --progress /var/mailman/ mailman_bak
-
#install
- sudo make install
-
#restart processes
- sudo /usr/share/mailman/bin/mailmanctl start
- sudo serveradmin start web
- sudo /bin/launchctl load -w /System/Library/LaunchDaemons/org.postfix.master.plist
After postfix is restarted in the final command, it may take several minutes for mail servers to recognize that your server is again accepting mail; this is especially true if you are only accepting mail from another central server for your organization.
- Xcode
- This is the premiere programming package for Mac OS X, and it comes with every Mac. Xcode allows you to program in Objective C, C, C++, AppleScript, and Java. Groups are working on integrating other languages such as Python, Perl, Ada, and Pascal.
More Duh
- ModelForms and FormViews
- This is just a notice because when I did a search, nothing came up. Don’t use ModelForm with FormView, use UpdateView instead.
- minidom self-closes empty SCRIPT tags
- Python’s minidom will self-close empty script tags—as it should. But it turns out that Firefox 3.6 and IE 8 don’t support empty script tags.
- Django using too much memory? Turn off DEBUG=True!
- DEBUG=False can save hundreds of megabytes in Django command-line scripts, and probably in Django web processes.
- Add nodes to SimpleXMLElement
- If you want to add child nodes in PHP’s SimpleXML, the correct way to do it is to add the node first, then create it.
- Django QuerySet Heisenberg gotcha
- Observing a system changes the system. That’s especially true with Django’s QuerySet API.
More Mac OS X Server
- Adding PDO_MYSQL to Mac OS X Leopard Server
- There’s “a feature request with engineering to include pdo_mysql” in Mac OS X Server. Fortunately, adding it is only moderately complex.
- checkpw failed, trying legacy method
- Tiger server does have auth_module available, it just isn’t listed in the httpd.conf file.
- Installing OS X Server 10.5 from the command line
- I ran into some very odd trouble installing Mac OS X Server 10.5 (Leopard) on one of our G5 Xserves. So I attempted to use the command-line install to get the error message.
More Mailman
- Modifying Mailman
- It’s not that difficult to add new features to Mailman, as long as you know where to look and remember that you’ll have to redo your changes after every upgrade.