diff --git a/Jamroot.linux b/Jamroot.linux index 052afbf4..e34ad555 100644 --- a/Jamroot.linux +++ b/Jamroot.linux @@ -10,7 +10,7 @@ using gcc ; # Python configuration #using python : 2.6 : /usr ; -using python : 3.5 ; +using python : 3.5 : : /usr/include/python3.5 ; # Specify the path to the Boost project. If you move this project, # adjust this path to refer to the Boost root directory. @@ -35,10 +35,10 @@ project : default-build release : requirements $(BOOST_INCLUDE_DIR) $(HKU_INCLUDE_DIR) gcc:-ftemplate-depth-300 - gcc:-std=c++0x - clang:-std=c++0x + gcc:-std=c++11 + clang:-std=c++11 gcc:-s - gcc:-Wl,-rpath,./:../ + gcc:-Wl,-rpath,./ gcc:BOOST_ALL_DYN_LINK msvc:64 msvc:_CRT_SECURE_NO_DEPRECATE diff --git a/build.sh b/build.sh index a3b77e63..49c0f2cd 100755 --- a/build.sh +++ b/build.sh @@ -5,7 +5,7 @@ cp Jamroot.linux Jamroot b2 -j 4 link=shared -#toolset=clang-linux-3.8 +#toolset=clang-linux-3.8.0 toolset=gcc-5.4.0 #cd ./libs @@ -13,6 +13,19 @@ toolset=gcc-5.4.0 #cd .. rm -v -f ./tools/hikyuu/*.so +rm -v -f ./tools/hikyuu/libboost* + +cp -v -f ${BOOST_ROOT}/bin.v2/libs/python/build/${toolset}/release/libboost_python3.so.* ./tools/hikyuu/ +cp -v -f ${BOOST_ROOT}/stage/lib/libboost_python.so.* ./tools/hikyuu/ +cp -v -f ${BOOST_ROOT}/stage/lib/libboost_chrono.so.* ./tools/hikyuu/ +cp -v -f ${BOOST_ROOT}/stage/lib/libboost_date_time.so.* ./tools/hikyuu/ +cp -v -f ${BOOST_ROOT}/stage/lib/libboost_filesystem.so.* ./tools/hikyuu/ +cp -v -f ${BOOST_ROOT}/stage/lib/libboost_system.so.* ./tools/hikyuu/ +cp -v -f ${BOOST_ROOT}/stage/lib/libboost_serialization.so.* ./tools/hikyuu/ + +cp -v -f ./build/hikyuu/$toolset/release/libhikyuu.so ./tools/hikyuu +cp -v -f ./build/hikyuu_utils/$toolset/release/libhikyuu_utils.so ./tools/hikyuu + cp -v -f ./build/hikyuu_python/$toolset/release/_hikyuu.so ./tools/hikyuu cp -v -f ./build/hikyuu_python/$toolset/release/indicator/_indicator.so ./tools/hikyuu/indicator @@ -21,11 +34,9 @@ cp -v -f ./build/hikyuu_python/$toolset/release/trade_sys/_trade_sys.so ./tools/ cp -v -f ./build/hikyuu_python/$toolset/release/trade_instance/_trade_instance.so ./tools/hikyuu/trade_instance -cp -v -f ./build/hikyuu/$toolset/release/libhikyuu.so ./tools/hikyuu -cp -v -f ./build/hikyuu_utils/$toolset/release/libhikyuu_utils.so ./tools/hikyuu cd ./test -b2 -j 4 link=shared +b2 link=shared python ../tools/hikyuu/test/test.py diff --git a/libs/hikyuu/Jamfile b/libs/hikyuu/Jamfile index 23321371..61a88081 100644 --- a/libs/hikyuu/Jamfile +++ b/libs/hikyuu/Jamfile @@ -35,12 +35,12 @@ lib hikyuu : [ glob-tree *.cpp ] lib hikyuu : [ glob-tree *.cpp ] /usr/lib/x86_64-linux-gnu/libsqlite3.so /usr/lib/x86_64-linux-gnu/libpthread.so - ../../hikyuu_extern_libs/linux64/libhdf5_serial.so - ../../hikyuu_extern_libs/linux64/libhdf5_serial_hl.so - ../../hikyuu_extern_libs/linux64/libhdf5_cpp.so - ../../hikyuu_extern_libs/linux64/libhdf5_hl_cpp.so - ../../hikyuu_extern_libs/linux64/liblog4cplus.so - ../../hikyuu_extern_libs/linux64/libmysqlclient.so + /usr/lib/x86_64-linux-gnu/libhdf5_serial.so + /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so + /usr/lib/x86_64-linux-gnu/libhdf5_cpp.so + /usr/lib/x86_64-linux-gnu/libhdf5_hl_cpp.so + /usr/local/lib/liblog4cplus.so + /usr/lib/x86_64-linux-gnu/libmysqlclient.so : clang ; diff --git a/libs/hikyuu_python/Jamfile b/libs/hikyuu_python/Jamfile index 70bcbffe..f02c1802 100644 --- a/libs/hikyuu_python/Jamfile +++ b/libs/hikyuu_python/Jamfile @@ -7,6 +7,7 @@ import python ; project : build-dir ../../build/hikyuu_python ; project : requirements gcc:/boost/python//boost_python3 + clang:/boost/python//boost_python3 msvc:/boost/python//boost_python /hikyuu//hikyuu /boost//thread @@ -34,6 +35,10 @@ python-extension _hikyuu : [ glob *.cpp ] /usr/local/lib/liblog4cplus.so : gcc ; +python-extension _hikyuu : [ glob *.cpp ] + /usr/local/lib/liblog4cplus.so + : clang + ; python-extension indicator/_indicator : [ glob indicator/*.cpp ] ; python-extension trade_manage/_trade_manage : [ glob trade_manage/*.cpp ] ; python-extension trade_sys/_trade_sys : [ glob trade_sys/*.cpp ] ; diff --git a/test/Jamfile b/test/Jamfile index 63a779bd..008e99eb 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -35,7 +35,7 @@ unit-test test_all_in_one : [ glob-tree *.cpp ] TEST_ALL_IN_ONE ; unit-test test_all_in_one : [ glob-tree *.cpp ] - ../hikyuu_extern_libs/linux64/liblog4cplus.so + /usr/local/lib/liblog4cplus.so : clang TEST_ALL_IN_ONE ; diff --git a/tools/hikyuu/hku_config.py b/tools/hikyuu/hku_config.py index 1652d11a..6e8c01fb 100644 --- a/tools/hikyuu/hku_config.py +++ b/tools/hikyuu/hku_config.py @@ -43,8 +43,8 @@ import_config = """ ;db - 指定基础信息数据库 ;sql - 当指定的基础信息数据库不存在时,使用该指定的脚本创建数据库 [database] -db = {dir}\stock.db -sql = {dir}\createdb.sql +db = {dir}/stock.db +sql = {dir}/createdb.sql ; ☆☆☆ 注:权息信息目前指支持钱龙数据格式 ;sh、sz分别指定上证、深圳的权息数据所在目录 @@ -66,24 +66,24 @@ sz = {dir}/weight/sznse/weight ;all默认为false,如目前数据库仅配置导入A股、B股、基金,而不导入国债 [dest] ;all = True -sh_day = {dir}\sh_day.h5 -sz_day = {dir}\sz_day.h5 -sh_5min = {dir}\sh_5min.h5 -sz_5min = {dir}\sz_5min.h5 -sh_1min = {dir}\sh_1min.h5 -sz_1min = {dir}\sz_1min.h5 +sh_day = {dir}/sh_day.h5 +sz_day = {dir}/sz_day.h5 +sh_5min = {dir}/sh_5min.h5 +sz_5min = {dir}/sz_5min.h5 +sh_1min = {dir}/sh_1min.h5 +sz_1min = {dir}/sz_1min.h5 """ hikyuu_config = """ [tmpdir] -tmpdir = {dir}\\tmp +tmpdir = {dir}/tmp [logger] -properties = {dir}\\logger.properties +properties = {dir}/logger.properties [block] type = qianlong -dir = {dir}\\block +dir = {dir}/block 指数板块 = zsbk.ini 行业板块 = hybk.ini 地域板块 = dybk.ini @@ -100,7 +100,7 @@ year = 0 [baseinfo] type = sqlite3 -db = {dir}\\stock.db +db = {dir}/stock.db ;type = mysql ;host = 127.0.0.1 ;port = 3306 @@ -111,7 +111,7 @@ db = {dir}\\stock.db ;type = tdx ;file = D:\\TdxW_HuaTai\\vipdoc type = hdf5 -file = c:\\stock\\sh_day.h5 +file = {dir}/sh_day.h5 ;type = mysql ;host = 127.0.0.1 ;port = 3306 @@ -120,49 +120,49 @@ file = c:\\stock\\sh_day.h5 [sh_week] type = hdf5 -file = {dir}\\sh_day.h5 +file = {dir}/sh_day.h5 [sh_month] type = hdf5 -file = {dir}\\sh_day.h5 +file = {dir}/sh_day.h5 [sh_quarter] type = hdf5 -file = {dir}\\sh_day.h5 +file = {dir}/sh_day.h5 [sh_halfyear] type = hdf5 -file = {dir}\\sh_day.h5 +file = {dir}/sh_day.h5 [sh_year] type = hdf5 -file = {dir}\\sh_day.h5 +file = {dir}/sh_day.h5 [sh_1min] type = hdf5 -file = {dir}\\sh_1min.h5 +file = {dir}/sh_1min.h5 [sh_5min] type = hdf5 -file = {dir}\\sh_5min.h5 +file = {dir}/sh_5min.h5 [sh_15min] type = hdf5 -file = {dir}\\sh_5min.h5 +file = {dir}/sh_5min.h5 [sh_30min] type = hdf5 -file = {dir}\\sh_5min.h5 +file = {dir}/sh_5min.h5 [sh_60min] type = hdf5 -file = {dir}\\sh_5min.h5 +file = {dir}/sh_5min.h5 ;深圳证券 [sz_day] type = hdf5 -file = {dir}\\sz_day.h5 +file = {dir}/sz_day.h5 ;type = mysql ;host = 127.0.0.1 ;port = 3306 @@ -171,43 +171,43 @@ file = {dir}\\sz_day.h5 [sz_week] type = hdf5 -file = {dir}\\sz_day.h5 +file = {dir}/sz_day.h5 [sz_month] type = hdf5 -file = {dir}\\sz_day.h5 +file = {dir}/sz_day.h5 [sz_quarter] type = hdf5 -file = {dir}\\sz_day.h5 +file = {dir}/sz_day.h5 [sz_halfyear] type = hdf5 -file = {dir}\\sz_day.h5 +file = {dir}/sz_day.h5 [sz_year] type = hdf5 -file = {dir}\\sz_day.h5 +file = {dir}/sz_day.h5 [sz_1min] type = hdf5 -file = {dir}\\sz_1min.h5 +file = {dir}/sz_1min.h5 [sz_5min] type = hdf5 -file = {dir}\\sz_5min.h5 +file = {dir}/sz_5min.h5 [sz_15min] type = hdf5 -file = {dir}\\sz_5min.h5 +file = {dir}/sz_5min.h5 [sz_30min] type = hdf5 -file = {dir}\\sz_5min.h5 +file = {dir}/sz_5min.h5 [sz_60min] type = hdf5 -file = {dir}\\sz_5min.h5 +file = {dir}/sz_5min.h5 """ diff --git a/tools/importdata/Jamfile b/tools/importdata/Jamfile index 09ac676c..c7d37f4b 100644 --- a/tools/importdata/Jamfile +++ b/tools/importdata/Jamfile @@ -31,10 +31,11 @@ exe importdata : [ glob-tree *.cpp ] exe importdata : [ glob-tree *.cpp ] /usr/lib/x86_64-linux-gnu/libsqlite3.so /usr/lib/x86_64-linux-gnu/libpthread.so - ../../hikyuu_extern_libs/linux64/libhdf5_serial.so - ../../hikyuu_extern_libs/linux64/libhdf5_serial_hl.so - ../../hikyuu_extern_libs/linux64/libhdf5_cpp.so - ../../hikyuu_extern_libs/linux64/libhdf5_hl_cpp.so + /usr/lib/x86_64-linux-gnu/libhdf5_serial.so + /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so + /usr/lib/x86_64-linux-gnu/libhdf5_cpp.so + /usr/lib/x86_64-linux-gnu/libhdf5_hl_cpp.so + /usr/local/lib/liblog4cplus.so : clang H5_USE_16_API ;