From 6868cdfcd7230abc32ff2123f19dd0bf979657b4 Mon Sep 17 00:00:00 2001 From: Andre Luckow Date: Sat, 7 Jul 2012 20:43:15 +0200 Subject: [PATCH] further fixes for pip support --- VERSION | 2 +- bigjob/__init__.py | 5 ++++- bigjob/bigjob_agent.py | 4 +--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index f937299a..1bf62959 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.4.80 +0.4.84 diff --git a/bigjob/__init__.py b/bigjob/__init__.py index bfdb366f..402de241 100644 --- a/bigjob/__init__.py +++ b/bigjob/__init__.py @@ -17,7 +17,7 @@ _conf_file = os.path.join(sys.prefix, _CONFIG_FILE) - print "using conf file: " + str(_conf_file) + #print "using conf file: " + str(_conf_file) _config = ConfigParser.ConfigParser() _config.read(_conf_file) @@ -80,6 +80,9 @@ import socket try: fn = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", 'VERSION') + if not os.path.exists(fn): + fn = os.path.join(sys.prefix, 'VERSION') + #print "Open Version file: " + str(fn) version = open(fn).read().strip() logger.info("Loading BigJob version: " + version + " on " + socket.gethostname()) except IOError: diff --git a/bigjob/bigjob_agent.py b/bigjob/bigjob_agent.py index 33b92c50..2453e54c 100644 --- a/bigjob/bigjob_agent.py +++ b/bigjob/bigjob_agent.py @@ -67,11 +67,9 @@ def __init__(self, args): self.restarted = {} # read config file - # conf_file = os.path.dirname(args[0]) + "/" + CONFIG_FILE - # conf_file = os.path.dirname(os.path.abspath( __file__ )) + "/" + CONFIG_FILE conf_file = os.path.dirname(os.path.abspath( __file__ )) + "/../" + CONFIG_FILE if not os.path.exists(conf_file): - _conf_file = os.path.join(sys.prefix, CONFIG_FILE) + conf_file = os.path.join(sys.prefix, CONFIG_FILE) config = ConfigParser.ConfigParser() logging.debug ("read configfile: " + conf_file)