#!/usr/bin/python # vim: set fileencoding=utf-8 : sts=4 : et : sw=4 # This is a component of mailpie, a full-text search for email # # Copyright © 2008 Jeff Epler # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA from distutils.core import setup import os, commands def require_program(s): for el in os.environ['PATH'].split(os.pathsep): j = os.path.join(el, s) if os.access(j, os.F_OK | os.X_OK): return True print "Warning: The required external program %r is not available." % s print "The software will probably not work without it." return False for p in ["swish-e"]: require_program(p) version = None if os.path.exists(".git"): status, gitversion = commands.getstatusoutput("git describe --tags") if status == 0: version = gitversion if not version: version = open("VERSION").read().strip() setup(name="mailpie", version=version, author="Jeff Epler", author_email = "jepler@unpythonic.net", packages=['mailpie'], package_dir={'mailpie': 'lib/mailpie'}, scripts=['scripts/mailpie-add', 'scripts/mailpie-index', 'scripts/mailpie-search', 'scripts/mailpie-flog'], url="http://emergent.unpy.net/software/mailpie/", license="GPL", ) # vim:sw=4:sts=4:et