From 4360e362dadf8cd13cb7823f2be25fe23deb7e81 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sat, 21 Mar 2015 14:34:19 +0200 Subject: Only install RPM macros on platforms that have rpm installed. --- install_meson.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'install_meson.py') diff --git a/install_meson.py b/install_meson.py index 298de96..2050ffb 100755 --- a/install_meson.py +++ b/install_meson.py @@ -107,7 +107,8 @@ if os.path.exists(module_dir): shutil.rmtree(module_dir) shutil.copytree('modules', module_dir) -print('Installing RPM macros to %s.' % rpmmacros_dir) -outfilename = os.path.join(rpmmacros_dir, 'macros.meson') -shutil.copyfile('macros.meson', outfilename) -shutil.copystat('macros.meson', outfilename) +if os.path.exists(os.path.join('/usr', rpmmacros_dir)): + print('Installing RPM macros to %s.' % rpmmacros_dir) + outfilename = os.path.join(rpmmacros_dir, 'macros.meson') + shutil.copyfile('macros.meson', outfilename) + shutil.copystat('macros.meson', outfilename) -- cgit v1.1