[spambayes-dev] Mac OS X package

Tony Meyer tameyer at ihug.co.nz
Wed Feb 25 01:33:02 EST 2004

> New to the list, and pretty new to spambayes. I've put together a 
> package for easy installation of spambayes on Mac OS X.
> Posted it on the wiki; http://www.entrian.com/sbwiki/MacOSXPackage

Cool, thanks!

> However, the utilities (such as which_db etc) still look for the libs 
> in /System/Library/Python.framework/... and don't find them 
> (obviously).

They should look for them wherever the config file says they are.  A
question is where the config file should default, to, though.  On Windows, a
bayescustomize.ini file is created in the "Application Data" directory, so
everything defaults to being relative to that.  There has been some
discussion (although it's not the case yet) of making Linux default to
creating a .spambayesrc file in ~, or maybe ~/.spambayes.

What's the "correct" place with OS X?  (Note that this includes the
bayescustomize.ini file (prefs), as well as the two databases, and the cache
directories (user data), so it could be quite big).  Does anyone know if
there's a way to get the path to this, like the win32all function that
provides the "Application Data" directory?

> the utilities, but I'm still wondering why everything else checks the 
> current directory first and then elsewhere for it's modules etc. when 
> the testtools and utilities don't...?

The way it works is that all the scripts look for a bayescustomize.ini file
- they look in an environment variable (BAYESCUSTOMIZE), in ~ (for
.spambayesrc) and in the current working directory.  If that's found, then
all default file locations are relative to that.  If it's not found then
(unless win32 as above) the current working directory is used as a default
location, and everything is relative to that.

I suspect that in your testing, you had a bayescustomize.ini file in your
scripts directory, and not elsewhere, which would explain the differing

> And also, am I breaching the license by leaving them out?

The license pretty much lets you do whatever you want with the code,
although IANAL.

=Tony Meyer

Please always include the list (spambayes at python.org) in your replies
(reply-all), and please don't send me personal mail about SpamBayes. This
way, you get everyone's help, and avoid a lack of replies when I'm busy.

More information about the spambayes-dev mailing list