summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'g_cran/phases.py')
-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'))