summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAuke Booij (tulcod) <auke@tulcod.com>2010-06-30 12:38:15 +0200
committerAuke Booij (tulcod) <auke@tulcod.com>2010-06-30 12:56:12 +0200
commit2869e74d87bff039a1569668b6aa8fcee7010e5c (patch)
treeb510cac23349b6f19d3ecf8a3300c53a5ae15a6a
parentSo license parsing wasn't really working yet... this one should work (diff)
downloadg-cran-2869e74d87bff039a1569668b6aa8fcee7010e5c.tar.gz
g-cran-2869e74d87bff039a1569668b6aa8fcee7010e5c.tar.bz2
g-cran-2869e74d87bff039a1569668b6aa8fcee7010e5c.zip
This should install docs correctly...
-rw-r--r--g_cran/phases.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/g_cran/phases.py b/g_cran/phases.py
index 6915979..48112d5 100644
--- a/g_cran/phases.py
+++ b/g_cran/phases.py
@@ -1,4 +1,4 @@
-import os
+import os,shutil
import cran_read
R_PLATFORM="ignoreplatform"
@@ -35,14 +35,22 @@ def src_install(env,local_repository):
if not os.path.exists(r_library):
os.makedirs(r_library)
#install the binary package without documentation (excluding documentation doesn't seem to work)
- returnval=verbose_system("R CMD INSTALL --debug --no-docs --no-html "+tarname+" -l "+r_library)
+ returnval=verbose_system("R CMD INSTALL --debug "+tarname+" -l "+r_library)
if returnval:
raise RuntimeError("R install failed")
- #todo install HTML help
- doc_dir=env['D']+'/usr/share/doc/'+env['PVR']
- if 'doc' in package.ebuild_vars['iuse'] and 'doc' in env['USE']:
+ try: #should be installed by R already, so remove from image
+ os.remove(os.path.join(r_library,'R.css'))
+ except:
pass
+
+ #todo install HTML help
+ doc_dir=env['D']+'/usr/share/doc/'+env['PF']
+ if 'doc' in package.ebuild_vars['iuse'] and 'doc' in env['USE']:
+ os.makedirs(doc_dir)
+ os.rename(os.path.join(r_library,package.cran_data['package'],'html'),doc_dir)
#not implemented
+ else:
+ shutil.rmtree(os.path.join(r_library,package.cran_data['package'],'html'))