diff --git a/setup.py b/setup.py index 08aad32..f3bb79c 100755 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ def finalize_options(self): def run(self): curdir = os.getcwd() - os.chdir(os.path.realpath('multiseek')) + os.chdir(os.path.join(os.path.dirname(__file__), 'multiseek')) from django.core.management import call_command call_command('compilemessages') os.chdir(curdir) @@ -86,12 +86,14 @@ def run(self): else: # Always try to build messages, fail if django not present # (I hate incomplete releases) - dir = os.getcwd() - os.chdir(os.path.join(dir, 'multiseek')) + cwd = os.getcwd() + os.chdir(os.path.join(os.path.dirname(__file__),'multiseek')) + del os.environ['DJANGO_SETTINGS_MODULE'] os.system('django-admin.py compilemessages') - os.chdir(dir) + os.chdir(cwd) def reqs(f): + f = os.path.join(os.path.dirname(__file__), f) for elem in open(f).readlines(): elem = elem.strip()