On 01/17/2011 1:23 PM, s...@pobox.com wrote:
Dale> I assume that to start SpamBayes with Python 2.5 I would run:
Dale> /usr/bin/python2.5 /usr/bin/sb_server.py
Dale> Is there anything else of which I should be aware?
It's likely that SpamBayes was installed using Python 2.6 in which case
/usr/lib/python2.5/site-packages won't have a package named "spambayes". If
that's the case you'll have to install it using your 2.5 interpreter.
That's straightforward to do from source, but the package system on your
Linux box is not likely to be happy with you sprinkling files in its space
which it doesn't know about. I'd check to see if there's a way to install
SpamBayes such that it depends on your Python 2.5 installation.
As you correctly guessed, there is no spambayes package listed in the
site-packages directory of Python 2.5.
When Debian moved from 2.5 to 2.6, I assume that this entry was
removed. Interestingly, in 2.6 there is no site-packages directory.
Python package management must be handled in some other manner. Knowing
very little how this is accomplished, I started looking
at building a debian package for the latest version of spambayes and
found the stdeb program. In Debian, the package is called
python-stdeb.
http://pypi.python.org/pypi/stdeb
I was able to build a .deb against Python 2.5 that successfully
installed via dpkg. The resulting package by default is called
python-spambayes. ps fax | grep server shows /usr/bin/python2.5
/usr/bin/sb_server.py. It took a couple of tries, but I think
I now have all the dependencies listed. dpkg will leave spambayes
unconfigured and prompt to install those currently missing,
after which dpkg will then finish spambayes configuration. Installation
does not put an entry in the site-packages directory, but
everything works as before.
So, this is not the solution for which I originally asked, but in many
respects, it is a better solution in that I now have a newer version
of spambayes installed. One last question - FAQ 4.13 speaks of setting
the environment variable BAYESCUSTOMIZE to reference
the configuration file. Where, how, or in what manner is this variable
set? For several years now, I've worked around this by putting
"cd /usr/bin" in my startup script, but would prefer to tell spambayes
where the .ini file is by using the proper method as shown in the
FAQ.
Thank you for the help and guidance.
Dale
_______________________________________________
SpamBayes@python.org
http://mail.python.org/mailman/listinfo/spambayes
Info/Unsubscribe: http://mail.python.org/mailman/listinfo/spambayes
Check the FAQ before asking: http://spambayes.sf.net/faq.html