Mimsy Were the Borogoves

Hacks: Articles about programming in Python, Perl, PHP, and whatever else I happen to feel like hacking at.

No distutils? Install Xcode

Jerry Stratton, April 29, 2009

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.

  • ./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.

  1. <- Heisenberg QuerySet
  2. Tiger auth_module ->