aboutsummaryrefslogtreecommitdiff
path: root/install_meson.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-03-21 14:34:19 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2015-03-21 14:34:19 +0200
commit4360e362dadf8cd13cb7823f2be25fe23deb7e81 (patch)
tree3c88e0bf8c27da5e83fbf1ce420eca2736feb3b5 /install_meson.py
parent81754680f03bd49020113da64e563db3b7fe056f (diff)
downloadmeson-4360e362dadf8cd13cb7823f2be25fe23deb7e81.zip
meson-4360e362dadf8cd13cb7823f2be25fe23deb7e81.tar.gz
meson-4360e362dadf8cd13cb7823f2be25fe23deb7e81.tar.bz2
Only install RPM macros on platforms that have rpm installed.
Diffstat (limited to 'install_meson.py')
-rwxr-xr-xinstall_meson.py9
1 files changed, 5 insertions, 4 deletions
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)