-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[python] Place modules into pytriqs.applications.* package hierarchy
* New package name is pytriqs.applications.analytical_continuation.som * Added a workaround based on use of sitecustomize.py (Cf. TRIQS/cthyb#50)
- Loading branch information
Showing
15 changed files
with
34 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
* Test all kernels and close #3 accordingly | ||
* Add automatic Python tests chi_* and chi_auto_* | ||
* Place Python module into pytriqs.applications package | ||
* Make adding new kernels more straightforward |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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__ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.. module:: triqs_som.som | ||
.. module:: pytriqs.applications.analytical_continuation.som | ||
|
||
.. _documentation: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
# where will the python end up in triqs? | ||
set(python_destination pytriqs/applications/analytical_continuation/som) | ||
|
||
# site_customize for build | ||
set(package_name "pytriqs.applications.analytical_continuation") | ||
configure_file(${CMAKE_SOURCE_DIR}/cmake/sitecustomize.py ${CMAKE_CURRENT_BINARY_DIR}/sitecustomize.py @ONLY) | ||
|
||
# make a local pytriqs copy | ||
triqs_prepare_local_pytriqs(${CMAKE_PROJECT_NAME}) | ||
triqs_prepare_local_pytriqs(${python_destination}) | ||
|
||
# Build the python modules | ||
triqs_python_extension_and_install(core) | ||
triqs_python_extension(core ${python_destination}) | ||
target_link_libraries(core som_c ${TRIQS_LIBRARY_ALL}) | ||
triqs_set_rpath_for_target(core) | ||
file(COPY parameters.rst DESTINATION .) | ||
|
||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/include ${TRIQS_INCLUDE_ALL}) | ||
|
||
install(FILES som.py __init__.py DESTINATION ${TRIQS_PYTHON_LIB_DEST_ROOT}/${CMAKE_PROJECT_NAME}) | ||
install(TARGETS core DESTINATION ${TRIQS_PYTHON_LIB_DEST_ROOT}/${python_destination}) | ||
install(FILES som.py __init__.py DESTINATION ${TRIQS_PYTHON_LIB_DEST_ROOT}/${python_destination}) | ||
|
||
# add version file | ||
configure_file(version.py.in version.py) | ||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/version.py DESTINATION ${TRIQS_PYTHON_LIB_DEST_ROOT}/${CMAKE_PROJECT_NAME}) | ||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/version.py DESTINATION ${TRIQS_PYTHON_LIB_DEST_ROOT}/${python_destination}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters