diff options
author | Auke Booij (tulcod) <auke@tulcod.com> | 2010-06-27 22:38:25 +0200 |
---|---|---|
committer | Auke Booij (tulcod) <auke@tulcod.com> | 2010-06-29 21:56:49 +0200 |
commit | a9c4383aa1d082c78fd793be860d54763d889ef7 (patch) | |
tree | 7ba9e579844a2cde84ca28a2c10d7bb9137d09d4 /g_cran | |
parent | Fix license parsing (diff) | |
download | g-cran-a9c4383aa1d082c78fd793be860d54763d889ef7.tar.gz g-cran-a9c4383aa1d082c78fd793be860d54763d889ef7.tar.bz2 g-cran-a9c4383aa1d082c78fd793be860d54763d889ef7.zip |
So license parsing wasn't really working yet... this one should work
Diffstat (limited to 'g_cran')
-rw-r--r-- | g_cran/cran_read.py | 3 | ||||
-rw-r--r-- | g_cran/g_cran.py | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/g_cran/cran_read.py b/g_cran/cran_read.py index 768712c..4bd51d4 100644 --- a/g_cran/cran_read.py +++ b/g_cran/cran_read.py @@ -41,10 +41,11 @@ def pmsify_license_field(license_list): license_name=parse.group(1).strip() version=parse.group(2).strip() try_license=license_name+'-'+version + else: #perhaps we just want version 1? + try_license=license_part+'-1' for license in available_licenses: if license==license_part or try_license==license: licenses.append(license) - found_license=True break else: licenses.append('as-is') #unknown diff --git a/g_cran/g_cran.py b/g_cran/g_cran.py index 0eb6515..0a071b0 100644 --- a/g_cran/g_cran.py +++ b/g_cran/g_cran.py @@ -43,7 +43,10 @@ def action_package(repo_location,package_name): elif isinstance(value,str): #if string print key.upper()+'='+value.replace('\n','') elif isinstance(value,list) and key=='license': - print "|| ( "+' '.join(value)+' )' + if len(value)>1: + print "LICENSE=|| ( "+' '.join(value)+' )' + else: + print "LICENSE="+' '.join(value) elif isinstance(value,list): #list, concat items print key.upper()+'='+' '.join(value).replace('\n','') for pms_func in pms_phases: |