aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Erdmann <dywi@mailerd.de>2012-06-21 18:51:32 +0200
committerAndré Erdmann <dywi@mailerd.de>2012-06-21 18:51:32 +0200
commitaa1c6dade666ed4e0ffb85fda3c8f0fcb9569d4f (patch)
treecc964a226ffeeb114dcf1eab60f0706addfc3386 /roverlay/recipe
parentuse os.path.abspath in PackageInfo.update() (diff)
downloadR_overlay-aa1c6dade666ed4e0ffb85fda3c8f0fcb9569d4f.tar.gz
R_overlay-aa1c6dade666ed4e0ffb85fda3c8f0fcb9569d4f.tar.bz2
R_overlay-aa1c6dade666ed4e0ffb85fda3c8f0fcb9569d4f.zip
added OverlayCreator
* this is a threaded R packages -> overlay interface new file: roverlay/overlay/creator.py new file: roverlay/overlay/worker.py new file: roverlay/recipe/__init__.py new file: roverlay/recipe/easyresolver.py
Diffstat (limited to 'roverlay/recipe')
-rw-r--r--roverlay/recipe/__init__.py2
-rw-r--r--roverlay/recipe/easyresolver.py25
2 files changed, 27 insertions, 0 deletions
diff --git a/roverlay/recipe/__init__.py b/roverlay/recipe/__init__.py
new file mode 100644
index 0000000..139597f
--- /dev/null
+++ b/roverlay/recipe/__init__.py
@@ -0,0 +1,2 @@
+
+
diff --git a/roverlay/recipe/easyresolver.py b/roverlay/recipe/easyresolver.py
new file mode 100644
index 0000000..c5e737a
--- /dev/null
+++ b/roverlay/recipe/easyresolver.py
@@ -0,0 +1,25 @@
+
+from roverlay import config
+from roverlay.depres import listeners
+from roverlay.depres.depresolver import DependencyResolver
+from roverlay.depres.simpledeprule import SimpleDependencyRulePool
+
+
+def setup():
+ res = DependencyResolver()
+ # log everything
+ res.set_logmask ( -1 )
+
+ srule_pool = SimpleDependencyRulePool ( 'default pool', priority=45 )
+
+ srule_files = config.get_or_fail ( 'DEPRES.simple_rules.files' )
+
+ if isinstance ( srule_files, str ):
+ srule_pool.load_rule_file ( srule_files )
+ else:
+ for f in srule_files:
+ srule_pool.load_rule_file ( f )
+
+ res.add_rulepool ( srule_pool )
+ return res
+# --- end of setup (...) ---