From 7aa09e666af4a726c63ae6896059a062f72d4029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 27 Apr 2012 13:36:02 +0200 Subject: [PATCH] Check if GTK locale directory exists before copying it --- setup.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 2bac21704e..e93598de9a 100644 --- a/setup.py +++ b/setup.py @@ -247,8 +247,9 @@ if os.name == 'nt': for lang in all_languages(): if os.path.isdir(os.path.join(dist_dir, 'share', 'locale', lang)): shutil.rmtree(os.path.join(dist_dir, 'share', 'locale', lang)) - shutil.copytree(os.path.join(gtk_dir, 'share', 'locale', lang), - os.path.join(dist_dir, 'share', 'locale', lang)) + if os.path.isdir(os.path.join(gtk_dir, 'share', 'locale', lang)): + shutil.copytree(os.path.join(gtk_dir, 'share', 'locale', lang), + os.path.join(dist_dir, 'share', 'locale', lang)) if os.path.isdir(os.path.join(dist_dir, 'share', 'themes', 'MS-Windows')): @@ -361,8 +362,9 @@ elif sys.platform == 'darwin': lang)): shutil.rmtree(os.path.join(resources_dir, 'share', 'locale', lang)) - shutil.copytree(os.path.join(gtk_dir, 'share', 'locale', lang), - os.path.join(resources_dir, 'share', 'locale', lang)) + if os.path.isdir(os.path.join(gtk_dir, 'share', 'locale', lang)): + shutil.copytree(os.path.join(gtk_dir, 'share', 'locale', lang), + os.path.join(resources_dir, 'share', 'locale', lang)) # fix pathes within shared libraries for library in chain(