diff --git a/CMakeLists.txt b/CMakeLists.txt index 698d2bc00374fc6256016e440ea953021d5abc8f..fb852d764f389bfdd994098559c01043074b2055 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,5 @@ cmake_minimum_required(VERSION 2.8) + if (SUPPORT_PYTHON_PLUGINS) project(API_CellFrame C) else() @@ -9,9 +10,7 @@ set(CMAKE_COLOR_MAKEFILE ON) set(CMAKE_C_STANDARD 11) - - -set(Python_ADDITIONAL_VERSIONS 3.7 3.6 3.5 3.4) +set(Python_ADDITIONAL_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4) find_package (PythonLibs REQUIRED) include_directories(${PYTHON_INCLUDE_DIR} include/) file(GLOB PYTHON_CELLFRAME_SRCS src/*.c) @@ -43,7 +42,9 @@ target_compile_options(dap_stream_ch_chain_net PRIVATE "-fpic" ) target_compile_options(dap_stream_ch_chain PRIVATE "-fpic" ) target_compile_options(dap_udp_server PRIVATE "-fpic" ) target_compile_options(dap_chain_net_srv PRIVATE "-fpic" ) -target_compile_options(dap_chain_net_srv_vpn PRIVATE "-fpic" ) +if(NOT WIN32) + target_compile_options(dap_chain_net_srv_vpn PRIVATE "-fpic" ) +endif() target_compile_options(dap_chain_gdb PRIVATE "-fpic" ) target_compile_options(dap_enc_server PRIVATE "-fpic") target_compile_options(dap_http_server PRIVATE "-fpic") @@ -135,7 +136,9 @@ target_compile_options(dap_stream_ch_chain_net PRIVATE "-fpic" ) target_compile_options(dap_stream_ch_chain PRIVATE "-fpic" ) target_compile_options(dap_udp_server PRIVATE "-fpic" ) target_compile_options(dap_chain_net_srv PRIVATE "-fpic" ) +if (NOT WIN32) target_compile_options(dap_chain_net_srv_vpn PRIVATE "-fpic" ) +endif() target_compile_options(dap_chain_gdb PRIVATE "-fpic" ) target_compile_options(dap_enc_server PRIVATE "-fpic") target_compile_options(dap_http_server PRIVATE "-fpic") diff --git a/dists/examples/1.Authority/MyAuthCli.py b/dists/examples/1.Authority/MyAuthCli.py index 1133efa5fe63117f95f96ce33629e73f47875f19..d2b5b6e6c611e5a3c6c34d3435bb84aa9628bf1d 100755 --- a/dists/examples/1.Authority/MyAuthCli.py +++ b/dists/examples/1.Authority/MyAuthCli.py @@ -1,7 +1,7 @@ #!/usr/bin/python3 import sys import os -from CellFrame.libCelLFrame import AppCli +from CellFrame.libCellFrame import AppCli app_name="MyAuth" tmp_dir = os.getcwd() + "/tmp" diff --git a/include/python-cellframe.h b/include/python-cellframe.h index f7ce9c49c6cda0fd1af728011166adeef92a13cc..c178d1f587882ab6bf4414acbe8263aa179bad62 100644 --- a/include/python-cellframe.h +++ b/include/python-cellframe.h @@ -34,7 +34,7 @@ #include "wrapping_dap_mempool.h" #include "wrapping_dap_http_folder.h" -#include "dap_http_client_simple.h" +//#include "dap_http_client_simple.h" #include "dap_chain_wallet.h" #include "dap_chain_cs.h" #include "dap_chain_cs_dag.h" diff --git a/setup.py b/setup.py index 390a59548563965f98a85c49a9d0ac6036a6230b..25260e618b9d07679fb583df0fbb3afe8f9889ae 100755 --- a/setup.py +++ b/setup.py @@ -48,9 +48,10 @@ class CMakeBuild(build_ext): cmake_args += ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}'.format( cfg.upper(), extdir)] - if sys.maxsize > 2**32: - cmake_args += ['-A', 'x64'] - build_args += ['--', '/m'] + cmake_args += ['-G', 'MinGW Makefiles'] + #if sys.maxsize > 2**32: + # cmake_args += ['-A', 'x64'] + #build_args += ['--', '/m'] else: cmake_args += ['-DCMAKE_BUILD_TYPE=' + cfg] build_args += ['--', '-j4'] diff --git a/src/python-cellframe.c b/src/python-cellframe.c index e2f1a4f9a0fd16f99e08358ca8bd83bdbcb48ee0..9fbff2c37e3ac7bab96326dd5edde513539c509c 100644 --- a/src/python-cellframe.c +++ b/src/python-cellframe.c @@ -13,7 +13,7 @@ static bool s_init_http_enc = false; static bool s_init_server_core = false; static bool s_init_mempool = false; -static bool s_init_http_client_simple = false; +//static bool s_init_http_client_simple = false; static bool s_init_wallet = false; static bool s_init_cs_dag = false; static bool s_init_cs_dag_poa = false; @@ -233,12 +233,13 @@ PyObject *python_cellframe_init(PyObject *self, PyObject *args){ return NULL; } s_init_mempool = true; + /* } else if (strcmp(c_value, "HttpClientSimple") == 0){ if (dap_http_client_simple_init() != 0){ PyErr_SetString(CellFrame_error, "Failed to initialize HttpClientSimple module. "); return NULL; } - s_init_http_client_simple = true; + s_init_http_client_simple = true;*/ } else if (strcmp(c_value, "Wallet") == 0){ if (dap_chain_wallet_init() != 0){ PyErr_SetString(CellFrame_error, "Failed to initialize Wallet module. ");