Skip to content
Snippets Groups Projects
Commit 23cfb5fa authored by dmitriy.gerasimov's avatar dmitriy.gerasimov
Browse files

Merge branch 'features-2773' into 'master'

Features 2773

See merge request !25
parents 268d0cb2 d6ca6138
No related branches found
No related tags found
1 merge request!25Features 2773
...@@ -38,3 +38,6 @@ ...@@ -38,3 +38,6 @@
path = cellframe-sdk-python/libdap-app-cli-python path = cellframe-sdk-python/libdap-app-cli-python
url = https://gitlab.demlabs.net/cellframe/libdap-app-cli-python.git url = https://gitlab.demlabs.net/cellframe/libdap-app-cli-python.git
branch = master branch = master
[submodule "cellframe-sdk-python/libdap-chain-wallet-python"]
path = cellframe-sdk-python/libdap-chain-wallet-python
url = https://gitlab.demlabs.net/cellframe/libdap-chain-wallet-python.git
...@@ -85,6 +85,7 @@ else() ...@@ -85,6 +85,7 @@ else()
add_subdirectory(cellframe-sdk-python/libdap-chain-python) add_subdirectory(cellframe-sdk-python/libdap-chain-python)
add_subdirectory(cellframe-sdk-python/libdap-app-cli-python) add_subdirectory(cellframe-sdk-python/libdap-app-cli-python)
add_subdirectory(cellframe-sdk-python/libdap-client-python) add_subdirectory(cellframe-sdk-python/libdap-client-python)
add_subdirectory(cellframe-sdk-python/libdap-chain-wallet-python)
target_compile_options(dap_chain_common_python_module PRIVATE "-fpic") target_compile_options(dap_chain_common_python_module PRIVATE "-fpic")
...@@ -95,6 +96,7 @@ else() ...@@ -95,6 +96,7 @@ else()
target_compile_options(dap_chain_python_module PRIVATE "-fpic") target_compile_options(dap_chain_python_module PRIVATE "-fpic")
target_compile_options(dap_app_cli_python_module PRIVATE "-fpic") target_compile_options(dap_app_cli_python_module PRIVATE "-fpic")
target_compile_options(dap_client_python_module PRIVATE "-fpic") target_compile_options(dap_client_python_module PRIVATE "-fpic")
target_compile_options(dap_chain_wallet_python_module PRIVATE "-fpic")
#if (SKBUILD) #if (SKBUILD)
message(STATUS "Make python extension") message(STATUS "Make python extension")
...@@ -161,6 +163,7 @@ target_link_libraries(${PROJECT_NAME} cellframe-sdk dap_python_module ...@@ -161,6 +163,7 @@ target_link_libraries(${PROJECT_NAME} cellframe-sdk dap_python_module
dap_chain_net_python_module dap_chain_net_python_module
dap_chain_gdb_python_module dap_chain_gdb_python_module
dap_app_cli_python_module dap_app_cli_python_module
dap_chain_wallet_python_module
${PYTHON_LIBRARIES} ${PYTHON_LIBRARIES}
) )
......
...@@ -271,7 +271,7 @@ PyObject *python_cellframe_init(PyObject *self, PyObject *args){ ...@@ -271,7 +271,7 @@ PyObject *python_cellframe_init(PyObject *self, PyObject *args){
} }
s_init_http_client_simple = true;*/ s_init_http_client_simple = true;*/
} else if (strcmp(c_value, "Wallet") == 0){ } else if (strcmp(c_value, "Wallet") == 0){
if (dap_chain_wallet_init() != 0){ if (dap_chain_wallet_init_py() != 0){
PyErr_SetString(CellFrame_error, "Failed to initialize Wallet module. "); PyErr_SetString(CellFrame_error, "Failed to initialize Wallet module. ");
return NULL; return NULL;
} }
...@@ -288,7 +288,7 @@ PyObject *python_cellframe_init(PyObject *self, PyObject *args){ ...@@ -288,7 +288,7 @@ PyObject *python_cellframe_init(PyObject *self, PyObject *args){
return NULL; return NULL;
} }
} else if (strcmp(c_value, "ChainCSDagPos") == 0){ } else if (strcmp(c_value, "ChainCSDagPos") == 0){
if (dap_chain_cs_dag_poa_init() != 0){ if (dap_chain_cs_dag_pos_init() != 0){
PyErr_SetString(CellFrame_error, "Failed to initialize ChainCSDagPos module. "); PyErr_SetString(CellFrame_error, "Failed to initialize ChainCSDagPos module. ");
return NULL; return NULL;
} }
...@@ -406,7 +406,8 @@ PyMODINIT_FUNC PyInit_libCellFrame(void){ ...@@ -406,7 +406,8 @@ PyMODINIT_FUNC PyInit_libCellFrame(void){
PyType_Ready(&DapStreamCtl_DapStreamCtlType) < 0 || PyType_Ready(&DapStreamCtl_DapStreamCtlType) < 0 ||
PyType_Ready(&DapMempool_DapMempoolType) < 0 || PyType_Ready(&DapMempool_DapMempoolType) < 0 ||
// ==== // ====
PyType_Ready(&DapAppCli_dapAppCliType ) < 0 PyType_Ready(&DapAppCli_dapAppCliType ) < 0 ||
PyType_Ready(&DapChainWallet_dapChainWalletType) < 0
){ ){
log_it(L_CRITICAL,"Not all py modules are ready for init"); log_it(L_CRITICAL,"Not all py modules are ready for init");
return NULL; return NULL;
...@@ -477,6 +478,7 @@ PyMODINIT_FUNC PyInit_libCellFrame(void){ ...@@ -477,6 +478,7 @@ PyMODINIT_FUNC PyInit_libCellFrame(void){
// ============= // =============
PyModule_AddObject(module, "ChainGDB", (PyObject*)&DapChainGDBObject_DapChainGDBType); PyModule_AddObject(module, "ChainGDB", (PyObject*)&DapChainGDBObject_DapChainGDBType);
PyModule_AddObject(module, "ChainWallet", (PyObject*)&DapChainWallet_dapChainWalletType);
PyModule_AddObject(module, "Http", (PyObject*)&DapHTTP_DapHTTPType); PyModule_AddObject(module, "Http", (PyObject*)&DapHTTP_DapHTTPType);
PyModule_AddObject(module, "EncHttp", (PyObject*)&DapEncHTTP_DapEncHTTPType); PyModule_AddObject(module, "EncHttp", (PyObject*)&DapEncHTTP_DapEncHTTPType);
...@@ -525,6 +527,12 @@ void deinit_modules(void){ ...@@ -525,6 +527,12 @@ void deinit_modules(void){
dap_common_deinit(); dap_common_deinit();
submodules_deint = true; submodules_deint = true;
} }
if (s_init_wallet){
dap_chain_wallet_deinit_py();
}
dap_config_close(g_config);
dap_config_deinit();
dap_common_deinit();
} }
PyObject *python_cellframe_deinit(PyObject *self, PyObject *args){ PyObject *python_cellframe_deinit(PyObject *self, PyObject *args){
......
Subproject commit 591cf4502be97766a9ac800bb66de761890c1c9f
Subproject commit 83f950f59d3ba97bcac9f108e8fb93bd12bfcfb3 Subproject commit 1ef04620dc5df45ef8da6a080c2f40c295514b42
...@@ -33,9 +33,10 @@ ...@@ -33,9 +33,10 @@
#include "wrapping_dap_stream_ctl.h" #include "wrapping_dap_stream_ctl.h"
#include "wrapping_dap_mempool.h" #include "wrapping_dap_mempool.h"
#include "wrapping_dap_http_folder.h" #include "wrapping_dap_http_folder.h"
#include "dap_chain_wallet_python.h"
//#include "dap_http_client_simple.h" //#include "dap_http_client_simple.h"
#include "dap_chain_wallet.h" //#include "dap_chain_wallet.h"
#include "dap_chain_cs.h" #include "dap_chain_cs.h"
#include "dap_chain_cs_dag.h" #include "dap_chain_cs_dag.h"
#include "dap_chain_cs_dag_poa.h" #include "dap_chain_cs_dag_poa.h"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment