def _create_rpmmacros():
 home = os.path.expanduser('~')
 rpmbuilddir = os.path.join(home, 'rpmbuild')
 if (not os.path.isdir(rpmbuilddir)):
  os.makedirs(rpmbuilddir)
 mockdir = os.path.join(home, 'mock')
 if (not os.path.isdir(mockdir)):
  os.makedirs(mockdir)
 rpmmacros = os.path.join(home, '.rpmmacros')
 with salt.utils.fopen(rpmmacros, 'w') as afile:
  afile.write('%_topdir {0}\n'.format(rpmbuilddir))
  afile.write('%signature gpg\n')
  afile.write('%_gpg_name packaging@saltstack.com\n')

def _create_rpmmacros ( ) : home = os . path . expanduser ( '~' ) rpmbuilddir = os . path . join ( home , 'rpmbuild' ) if ( not os . path . isdir ( rpmbuilddir ) ) : os . makedirs ( rpmbuilddir ) mockdir = os . path . join ( home , 'mock' ) if ( not os . path . isdir ( mockdir ) ) : os . makedirs ( mockdir ) rpmmacros = os . path . join ( home , '.rpmmacros' ) with salt . utils . fopen ( rpmmacros , 'w' ) as afile : afile . write ( '%_topdir {0}\n' . format ( rpmbuilddir ) ) afile . write ( '%signature gpg\n' ) afile . write ( '%_gpg_name packaging@saltstack.com\n' )
create the .