diff --git a/setup.py b/setup.py index 2ead823..568bc5f 100644 --- a/setup.py +++ b/setup.py @@ -15,8 +15,6 @@ from distutils.command.build import build as _build from distutils.command.sdist import sdist from setuptools import setup, find_packages -BASE_DIR = os.path.dirname(__file__) - class eo_sdist(sdist): def run(self): @@ -63,17 +61,19 @@ class compile_translations(Command): pass def run(self): + curdir = os.getcwd() try: from django.core.management import call_command for path, dirs, files in os.walk('gadjo'): if 'locale' not in dirs: continue - curdir = os.getcwd() os.chdir(os.path.realpath(path)) call_command('compilemessages') os.chdir(curdir) except ImportError: sys.stderr.write('!!! Please install Django >= 1.4 to build translations\n') + finally: + os.chdir(curdir) class build_icons(Command): @@ -87,7 +87,7 @@ class build_icons(Command): pass def run(self): - destpath = os.path.join(BASE_DIR, 'gadjo/static/css/icons/') + destpath = 'gadjo/static/css/icons/' if not os.path.exists(destpath): os.mkdir(destpath) variants = {