3
0
mirror of https://github.com/triqs/dft_tools synced 2024-11-06 22:23:52 +01:00

[cmake] Fix broken tests after change in TRIQS install macros

- After the change in main lib, need to put explicitely the
  sitecustomize file
This commit is contained in:
Olivier Parcollet 2016-02-04 08:28:47 +01:00
parent 919e0a3ead
commit 1434193a38
2 changed files with 12 additions and 0 deletions

8
cmake/sitecustomize.py Normal file
View File

@ -0,0 +1,8 @@
def application_pytriqs_import(name,*args,**kwargs):
if name.startswith('@package_name@'):
name = name[len('@package_name@')+1:]
return builtin_import(name,*args,**kwargs)
import __builtin__
__builtin__.__import__, builtin_import = application_pytriqs_import, __builtin__.__import__

View File

@ -1,5 +1,9 @@
# where will the python end up in triqs? # where will the python end up in triqs?
set(python_destination applications/dft) set(python_destination applications/dft)
# site_customize for build
set(package_name "pytriqs.applications")
configure_file(${CMAKE_SOURCE_DIR}/cmake/sitecustomize.py ${CMAKE_CURRENT_BINARY_DIR}/sitecustomize.py @ONLY)
# make a local pytriqs copy # make a local pytriqs copy
triqs_prepare_local_pytriqs(${python_destination}) triqs_prepare_local_pytriqs(${python_destination})