#!/usr/bin/env python
# -------------------------------------------------------------------
#  @author Justin Kirby <jkirby@voalte.com>
#  @copyright (C) 2011 Justin Kirby
#  @end
# 
#  This source file is subject to the New BSD License. You should have received
#  a copy of the New BSD license with this software. If not, it can be
#  retrieved from: http://www.opensource.org/licenses/bsd-license.php
# -------------------------------------------------------------------


import os
import sys
import getopt
import itertools


class DepFail(Exception):
    def __init__(self,pkg):
        self.pkg = pkg
        (distro,a,b,c,d) = os.uname()
        self.os = distro
        self.msgs={
            "Linux":{
                "gtk":"Use your linux pkg manager to install pygtk",
                "numpy":"Use your linux pkg manager to install numpy",
                "matplotlib":"Use your linux pkg manager to install matplotlib",
                "yaml":"User your linux pkg manager to install python yaml",
                },
            "Darwin":{
                "gtk":"""
Do not bother trying to install pygtk. This is just too
painful. Instead use the headless option for this program and use a
tool that can importdata from csv files.
""",
                "numpy":"Use ports to install numpy. sudo port install py26-numpy",
                "matplotlib":"Use ports to install matplotlib, or the dmg from 1.0 on sf.net",
                "yaml":"Use ports to install python yaml."