Skip to content

Commit fa286e5

Browse files
committed
Fix paths for command line client
1 parent 7dacc70 commit fa286e5

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

core/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ SET(ALGORITHM_SRC_FILES
5151
algorithms/expand_delta.cc
5252
algorithms/expand_diracbar.cc
5353
algorithms/expand_power.cc
54+
algorithms/explicit_indices.cc
5455
algorithms/factor_in.cc
5556
algorithms/factor_out.cc
5657
algorithms/fierz.cc

core/cadabra2.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ if __name__ == '__main__':
232232
#print('executing '+rs)
233233
os.system(rs)
234234
else:
235-
with open("${PYTHON_SITE_PATH}/cadabra2_defaults.py") as f:
235+
with open("${CMAKE_INSTALL_PREFIX}/${PYTHON_SITE_PATH}/cadabra2_defaults.py") as f:
236236
code = compile(f.read(), "cadabra2_defaults.py", 'exec')
237237
exec(code)
238238

@@ -250,5 +250,5 @@ if __name__ == '__main__':
250250
# pulling in the right locals/globals
251251
# sh.interact(banner='Info at http://cadabra.phi-sci.com/\nAvailable under the terms of the GNU General Public License v3\n', locals(), globals())
252252
else:
253-
sh.runsource("import os; import sys; install_prefix=os.path.realpath(sys.argv[0]); install_prefix=install_prefix.replace('/bin/cadabra2','/share/cadabra2/python'); sys.path.append(install_prefix); print('Cadabra @CADABRA_VERSION_MAJOR@.@CADABRA_VERSION_MINOR@.@CADABRA_VERSION_PATCH@ (build @CADABRA_VERSION_BUILD@ dated @CADABRA_VERSION_DATE@)'); print ('Copyright (C) @COPYRIGHT_YEARS@ Kasper Peeters <[email protected]>'); f=open('${PYTHON_SITE_PATH}/cadabra2_defaults.py'); code=compile(f.read(), 'cadabra2_defaults.py', 'exec'); exec(code); f.close(); print('Using SymPy version '+sympy.__version__);")
253+
sh.runsource("import os; import sys; install_prefix=os.path.realpath(sys.argv[0]); install_prefix=install_prefix.replace('/bin/cadabra2','/share/cadabra2/python'); sys.path.append(install_prefix); print('Cadabra @CADABRA_VERSION_MAJOR@.@CADABRA_VERSION_MINOR@.@CADABRA_VERSION_PATCH@ (build @CADABRA_VERSION_BUILD@ dated @CADABRA_VERSION_DATE@)'); print ('Copyright (C) @COPYRIGHT_YEARS@ Kasper Peeters <[email protected]>'); f=open('${CMAKE_INSTALL_PREFIX}/${PYTHON_SITE_PATH}/cadabra2_defaults.py'); code=compile(f.read(), 'cadabra2_defaults.py', 'exec'); exec(code); f.close(); print('Using SymPy version '+sympy.__version__);")
254254
sh.interact(banner='Info at http://cadabra.science/\nAvailable under the terms of the GNU General Public License v3\n')

core/pythoncdb/py_algorithms.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "../algorithms/expand_delta.hh"
2424
#include "../algorithms/expand_diracbar.hh"
2525
#include "../algorithms/expand_power.hh"
26+
#include "../algorithms/explicit_indices.hh"
2627
#include "../algorithms/factor_in.hh"
2728
#include "../algorithms/factor_out.hh"
2829
#include "../algorithms/fierz.hh"
@@ -87,6 +88,7 @@ namespace cadabra
8788
def_algo<expand_delta>(m, "expand_delta", true, false, 0);
8889
def_algo<expand_diracbar>(m, "expand_diracbar", true, false, 0);
8990
def_algo<expand_power>(m, "expand_power", true, false, 0);
91+
def_algo<explicit_indices>(m, "explicit_indices", true, false, 0);
9092
def_algo<flatten_sum>(m, "flatten_sum", true, false, 0);
9193
def_algo<indexsort>(m, "indexsort", true, false, 0);
9294
def_algo<lr_tensor>(m, "lr_tensor", true, false, 0);

0 commit comments

Comments
 (0)