Only install RPM macros on platforms that have rpm installed.

This commit is contained in:
Jussi Pakkanen 2015-03-21 14:34:19 +02:00
parent 81754680f0
commit 4360e362da
1 changed files with 5 additions and 4 deletions

View File

@ -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)