diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-03-20 11:20:46 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-03-20 11:20:46 +0100 |
commit | 1044332131498907bde76400638cfb42b9e4199d (patch) | |
tree | a84800b931aeb6f2c5fa83fe5db3b8cbf7f40823 /python/builder.py | |
parent | d1ad446669cea2a76d7146023e4862a1fdbf3e13 (diff) | |
parent | 2d55fd38b4a8ef5076c0591ae4147f81c1107ee3 (diff) | |
download | astra-1044332131498907bde76400638cfb42b9e4199d.tar.gz astra-1044332131498907bde76400638cfb42b9e4199d.tar.bz2 astra-1044332131498907bde76400638cfb42b9e4199d.tar.xz astra-1044332131498907bde76400638cfb42b9e4199d.zip |
Merge branch 'master' into logging
Diffstat (limited to 'python/builder.py')
-rw-r--r-- | python/builder.py | 19 |
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 = [ ] |