From 50c50cea7088143ac6e6ec909266bf9d9097d9b6 Mon Sep 17 00:00:00 2001
From: Manuel Guenther <manuel.guenther@idiap.ch>
Date: Wed, 17 Jun 2015 10:03:55 +0200
Subject: [PATCH] Improved py26 compatibility; added develop.cfg

---
 MANIFEST.in                  |  2 +-
 bob/bio/base/script/score.py |  7 +++--
 buildout.cfg                 | 36 +-----------------------
 develop.cfg                  | 54 ++++++++++++++++++++++++++++++++++++
 4 files changed, 60 insertions(+), 39 deletions(-)
 create mode 100644 develop.cfg

diff --git a/MANIFEST.in b/MANIFEST.in
index 5b6fe118..aca04fcb 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,2 +1,2 @@
-include README.rst bootstrap-buildout.py buildout.cfg COPYING version.txt
+include README.rst bootstrap-buildout.py buildout.cfg develop.cfg COPYING version.txt requirements.txt
 recursive-include doc *.py *.rst
diff --git a/bob/bio/base/script/score.py b/bob/bio/base/script/score.py
index 2e617e09..e6b6436e 100644
--- a/bob/bio/base/script/score.py
+++ b/bob/bio/base/script/score.py
@@ -48,13 +48,14 @@ def main(command_line_parameters=None):
       raise ValueError("The desired algorithm requires a pre-trained enroller file, but it was not specified")
     algorithm.load_enroller(args.enroller_file)
 
+  models, probes = {}, {}
   logger.debug("Loading %d models", len(args.model_files))
-  models = {m : algorithm.read_model(m) for m in args.model_files}
+  for m in args.model_files: models[m] = algorithm.read_model(m)
   logger.debug("Loading %d probes", len(args.probe_files))
-  probes = {p : algorithm.read_probe(p) for p in args.probe_files}
+  for p in args.probe_files: probes[p] = algorithm.read_probe(p)
   if algorithm.performs_projection:
     logger.debug("Projecting %d probes", len(args.probe_files))
-    probes = {p : algorithm.project(probes[p]) for p in probes}
+    for p in probes: probes[p] = algorithm.project(probes[p])
 
   logger.info("Computing scores")
   for p in args.probe_files:
diff --git a/buildout.cfg b/buildout.cfg
index 026c9c5b..1886d156 100644
--- a/buildout.cfg
+++ b/buildout.cfg
@@ -8,47 +8,13 @@ eggs = bob.bio.base
        gridtk
 
 extensions = bob.buildout
-             mr.developer
-auto-checkout = *
-develop = src/bob.extension
-          src/bob.blitz
-          src/bob.core
-          src/bob.io.base
-          src/bob.learn.activation
-          src/bob.math
-          src/bob.learn.linear
-          src/bob.sp
-          src/bob.learn.em
-          src/bob.measure
-          src/bob.db.base
-          src/bob.db.verification.utils
-          src/bob.db.verification.filelist
-          src/bob.db.atnt
-          src/bob.io.image
-          .
+develop = .
          
 ; options for bob.buildout
 debug = true
 verbose = true
 newest = false
 
-[sources]
-bob.extension = git https://github.com/bioidiap/bob.extension
-bob.blitz = git https://github.com/bioidiap/bob.blitz
-bob.core = git https://github.com/bioidiap/bob.core
-bob.io.base = git https://github.com/bioidiap/bob.io.base
-bob.learn.activation = git https://github.com/bioidiap/bob.learn.activation
-bob.math = git https://github.com/bioidiap/bob.math
-bob.sp = git https://github.com/bioidiap/bob.sp
-bob.learn.linear = git https://github.com/bioidiap/bob.learn.linear
-bob.learn.em = git https://github.com/bioidiap/bob.learn.em
-bob.measure = git https://github.com/bioidiap/bob.measure
-bob.db.base = git https://github.com/bioidiap/bob.db.base
-bob.db.verification.utils = git https://github.com/bioidiap/bob.db.verification.utils
-bob.db.verification.filelist = git https://github.com/bioidiap/bob.db.verification.filelist
-bob.db.atnt = git https://github.com/bioidiap/bob.db.atnt
-bob.io.image = git https://github.com/bioidiap/bob.io.image
-
 [scripts]
 recipe = bob.buildout:scripts
 dependent-scripts = true
diff --git a/develop.cfg b/develop.cfg
new file mode 100644
index 00000000..026c9c5b
--- /dev/null
+++ b/develop.cfg
@@ -0,0 +1,54 @@
+; vim: set fileencoding=utf-8 :
+; Manuel Guenther <manuel.guenther@idiap.ch>
+; Thu Oct  9 16:51:06 CEST 2014
+
+[buildout]
+parts = scripts
+eggs = bob.bio.base
+       gridtk
+
+extensions = bob.buildout
+             mr.developer
+auto-checkout = *
+develop = src/bob.extension
+          src/bob.blitz
+          src/bob.core
+          src/bob.io.base
+          src/bob.learn.activation
+          src/bob.math
+          src/bob.learn.linear
+          src/bob.sp
+          src/bob.learn.em
+          src/bob.measure
+          src/bob.db.base
+          src/bob.db.verification.utils
+          src/bob.db.verification.filelist
+          src/bob.db.atnt
+          src/bob.io.image
+          .
+         
+; options for bob.buildout
+debug = true
+verbose = true
+newest = false
+
+[sources]
+bob.extension = git https://github.com/bioidiap/bob.extension
+bob.blitz = git https://github.com/bioidiap/bob.blitz
+bob.core = git https://github.com/bioidiap/bob.core
+bob.io.base = git https://github.com/bioidiap/bob.io.base
+bob.learn.activation = git https://github.com/bioidiap/bob.learn.activation
+bob.math = git https://github.com/bioidiap/bob.math
+bob.sp = git https://github.com/bioidiap/bob.sp
+bob.learn.linear = git https://github.com/bioidiap/bob.learn.linear
+bob.learn.em = git https://github.com/bioidiap/bob.learn.em
+bob.measure = git https://github.com/bioidiap/bob.measure
+bob.db.base = git https://github.com/bioidiap/bob.db.base
+bob.db.verification.utils = git https://github.com/bioidiap/bob.db.verification.utils
+bob.db.verification.filelist = git https://github.com/bioidiap/bob.db.verification.filelist
+bob.db.atnt = git https://github.com/bioidiap/bob.db.atnt
+bob.io.image = git https://github.com/bioidiap/bob.io.image
+
+[scripts]
+recipe = bob.buildout:scripts
+dependent-scripts = true
-- 
GitLab