summaryrefslogtreecommitdiffstats
path: root/python/builder.py
diff options
context:
space:
mode:
authorWim van Aarle <wimvanaarle@gmail.com>2015-05-26 15:43:08 +0200
committerWim van Aarle <wimvanaarle@gmail.com>2015-05-26 15:43:08 +0200
commit3117c7a61a83ca28ba00211d1eb65eaf13a7307a (patch)
tree4851ae878cf499deb2ae2f77575b3c48ecaf5d04 /python/builder.py
parent9e884e760b71be354c08892f6bce2efe723917b3 (diff)
parent57668bcdd086145eb14598e32fd5d0dca711865c (diff)
downloadastra-3117c7a61a83ca28ba00211d1eb65eaf13a7307a.tar.gz
astra-3117c7a61a83ca28ba00211d1eb65eaf13a7307a.tar.bz2
astra-3117c7a61a83ca28ba00211d1eb65eaf13a7307a.tar.xz
astra-3117c7a61a83ca28ba00211d1eb65eaf13a7307a.zip
Merge remote-tracking branch 'upstream/master' into parallel_vec
Conflicts: astra_vc11.vcxproj.filters python/astra/functions.py src/ParallelBeamBlobKernelProjector2D.cpp src/ProjectionGeometry2D.cpp
Diffstat (limited to 'python/builder.py')
-rw-r--r--python/builder.py19
1 files changed, 16 insertions, 3 deletions
diff --git a/python/builder.py b/python/builder.py
index ddca795..cfdb7d1 100644
--- a/python/builder.py
+++ b/python/builder.py
@@ -41,9 +41,22 @@ try:
usecuda=True
except KeyError:
pass
-cfg = open('astra/config.pxi','w')
-cfg.write('DEF HAVE_CUDA=' + str(usecuda) + "\n")
-cfg.close()
+
+cfgToWrite = 'DEF HAVE_CUDA=' + str(usecuda) + "\n"
+cfgHasToBeUpdated = True
+try:
+ cfg = open('astra/config.pxi','r')
+ cfgIn = cfg.read()
+ cfg.close()
+ if cfgIn==cfgToWrite:
+ cfgHasToBeUpdated = False
+except IOError:
+ pass
+
+if cfgHasToBeUpdated:
+ cfg = open('astra/config.pxi','w')
+ cfg.write(cfgToWrite)
+ cfg.close()
cmdclass = { }
ext_modules = [ ]