Skip to content
Snippets Groups Projects
Commit 39a796df authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

New bornagain library with __init__.py to include into installation.

parent 4d6ff432
No related branches found
No related tags found
No related merge requests found
......@@ -118,6 +118,9 @@ install (DIRECTORY ${CMAKE_SOURCE_DIR}/Examples/cpp DESTINATION ${destination_ex
install (TARGETS ${library_name} DESTINATION ${destination_lib} COMPONENT Libraries)
install (FILES ${core_include_files} DESTINATION ${destination_include} COMPONENT Headers)
# installing bornagain/__init.py
install (DIRECTORY ${CMAKE_SOURCE_DIR}/dev-tools/python-setup/bornagain DESTINATION ${destination_lib} COMPONENT Libraries)
if(WIN32)
# python in windows required .pyd extention for the library name
if(BORNAGAIN_PYTHON)
......
......@@ -2,7 +2,7 @@
import numpy
import matplotlib
import pylab
from libBornAgainCore import *
from bornagain import *
def get_sample():
......
......@@ -12,6 +12,10 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_RUNTIME_OUTPU
set(destination_runtime_configs ${CMAKE_BINARY_DIR}/runtime_configs)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${destination_runtime_configs})
# creating bornagain/__init__.py in runtime lib directory
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/bornagain)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/dev-tools/python-setup/bornagain ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/bornagain)
# --- file extensions ---------
if(WIN32)
......
Python utilities to setup BornAgain libraries
1) bornagain_python_install.py
Script to install BornAgain libraries into site-packages of user Python on MacOs systems.
The script to install BornAgain libraries into site-packages of user Python on MacOs systems.
Requires that BornAgain.app has to be installed on the system.
2) bornagain
The directory with __init__.py to be installed into lib directory. The goal is to have
the directive 'import bornagain' available on Python.
import sys
import os
sys.path.append(os.path.abspath(
os.path.join(os.path.split(__file__)[0],
'..')))
from libBornAgainCore import *
from libBornAgainFit import *
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment