diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2015-03-21 14:34:19 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2015-03-21 14:34:19 +0200 |
commit | 4360e362dadf8cd13cb7823f2be25fe23deb7e81 (patch) | |
tree | 3c88e0bf8c27da5e83fbf1ce420eca2736feb3b5 /install_meson.py | |
parent | 81754680f03bd49020113da64e563db3b7fe056f (diff) | |
download | meson-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-x | install_meson.py | 9 |
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) |