def create_version_h(svn_version):
 if ('-' in svn_version):
  while (svn_version.count('.') < 2):
   svn_version = svn_version.replace('-', '.0-')
 else:
  while (svn_version.count('.') < 2):
   svn_version += '.0'
 version_h = open(os.path.join(get_base_dir(), 'src', 'lxml', 'includes', 'lxml-version.h'), 'w')
 version_h.write(('#ifndef LXML_VERSION_STRING\n#define LXML_VERSION_STRING "%s"\n#endif\n' % svn_version))
 version_h.close()

def create_version_h ( svn_version ) : if ( '-' in svn_version ) : while ( svn_version . count ( '.' ) < 2 ) : svn_version = svn_version . replace ( '-' , '.0-' ) else : while ( svn_version . count ( '.' ) < 2 ) : svn_version += '.0' version_h = open ( os . path . join ( get_base_dir ( ) , 'src' , 'lxml' , 'includes' , 'lxml-version.h' ) , 'w' ) version_h . write ( ( '#ifndef LXML_VERSION_STRING\n#define LXML_VERSION_STRING "%s"\n#endif\n' % svn_version ) ) version_h . close ( )
create lxml-version .