summaryrefslogtreecommitdiff
path: root/g_cran
diff options
context:
space:
mode:
authorAuke Booij (tulcod) <auke@tulcod.com>2010-06-27 22:38:25 +0200
committerAuke Booij (tulcod) <auke@tulcod.com>2010-06-29 21:56:49 +0200
commita9c4383aa1d082c78fd793be860d54763d889ef7 (patch)
tree7ba9e579844a2cde84ca28a2c10d7bb9137d09d4 /g_cran
parentFix license parsing (diff)
downloadg-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.py3
-rw-r--r--g_cran/g_cran.py5
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: