diff --git a/.gitignore b/.gitignore index 143cc924..35ce77f0 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,7 @@ tools/pip/**/*.egg-info tools/conda/epics-base-conda/meta.yaml tools/conda/pvapy-boost-conda/meta.yaml tools/conda/pvapy-conda/meta.yaml +pvaccess/pvaccess.so wheelhouse diff --git a/documentation/RELEASE_NOTES.md b/documentation/RELEASE_NOTES.md index 76e00667..7f806456 100644 --- a/documentation/RELEASE_NOTES.md +++ b/documentation/RELEASE_NOTES.md @@ -1,4 +1,4 @@ -## Release 4.1.0 (2022/01/25) +## Release 4.1.0 (2022/01/26) - introduced PVA server mirror class - added distributor plugin for the PVA server (see the diff --git a/test/run_tests.sh b/test/run_tests.sh index 7b70ade3..9bd8968f 100755 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -4,7 +4,7 @@ echo "Starting test server" python testServer.py 30 & echo "Starting tests" -nosetests -sv +nose2 -v wait echo "Tests done" diff --git a/tools/autoconf/m4/ax_pva_py.m4 b/tools/autoconf/m4/ax_pva_py.m4 index d779439a..fe01de37 100644 --- a/tools/autoconf/m4/ax_pva_py.m4 +++ b/tools/autoconf/m4/ax_pva_py.m4 @@ -17,7 +17,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 4 +#serial 5 AC_DEFUN([AX_PVAPY], @@ -147,12 +147,17 @@ AC_DEFUN([AX_PVAPY], PVAPY_LDFLAGS=`echo $(printf "%s\n" $PVAPY_LDFLAGS | sort -u)` PVAPY_LD_LIBRARY_PATH=`echo $PVAPY_LDFLAGS | sed 's?-L??g' | sed 's? ?:?g' | sed 's?:-l.*:?:?g' | sed 's?:-l.*??g'` + PYTHON_MAJOR_VERSION=`python$PYTHON_VERSION -c "import sys; print(sys.version.split()[[0]].split('.')[[0]])"` + PYTHON_MINOR_VERSION=`python$PYTHON_VERSION -c "import sys; print(sys.version.split()[[0]].split('.')[[1]])"` + PYTHON_MAJOR_MINOR_VERSION=$PYTHON_MAJOR_VERSION.$PYTHON_MINOR_VERSION + AC_MSG_NOTICE([Determined BOOST_PYTHON_NUMPY_CPPFLAGS: $BOOST_PYTHON_NUMPY_CPPFLAGS]) AC_MSG_NOTICE([Determined BOOST_PYTHON_NUMPY_LDFLAGS: $BOOST_PYTHON_NUMPY_LDFLAGS]) AC_MSG_NOTICE([Determined BOOST_NUMPY_CPPFLAGS: $BOOST_NUMPY_CPPFLAGS]) AC_MSG_NOTICE([Determined BOOST_NUMPY_LDFLAGS: $BOOST_NUMPY_LDFLAGS]) AC_MSG_NOTICE([Determined BOOST_CPPFLAGS: $BOOST_CPPFLAGS]) AC_MSG_NOTICE([Determined BOOST_LDFLAGS: $BOOST_LDFLAGS]) + AC_MSG_NOTICE([Determined PYTHON_MAJOR_MINOR_VERSION: $PYTHON_MAJOR_MINOR_VERSION]) AC_MSG_NOTICE([Determined PYTHON_CPPFLAGS: $PYTHON_CPPFLAGS]) AC_MSG_NOTICE([Determined PYTHON_LDFLAGS: $PYTHON_LDFLAGS]) @@ -186,11 +191,10 @@ AC_DEFUN([AX_PVAPY], AC_MSG_NOTICE([Created $release_local file]) # create CONFIG_SITE.local - PVAPY_MAJOR_MINOR_VERSION=`python$PYTHON_VERSION -c 'import sys; print(sys.version[[:3]])'` PVAPY_PYTHON=`which python$PYTHON_VERSION` PVAPY_PYTHON_DIR=`dirname $PVAPY_PYTHON` PVAPY_HOST_ARCH=$EPICS_HOST_ARCH - PVAPY_PYTHONPATH=$PVAPY_TOP/lib/python/$PVAPY_MAJOR_MINOR_VERSION/$PVAPY_HOST_ARCH + PVAPY_PYTHONPATH=$PVAPY_TOP/lib/python/$PYTHON_MAJOR_MINOR_VERSION/$PVAPY_HOST_ARCH PVAPY_SPHINX_BUILD=`which sphinx-build 2> /dev/null` echo "PVAPY_CPPFLAGS = $PVAPY_CPPFLAGS" >> $config_site_local @@ -200,7 +204,7 @@ AC_DEFUN([AX_PVAPY], echo "PVA_RPC_API_VERSION = $PVA_RPC_API_VERSION" >> $config_site_local echo "HAVE_BOOST_NUMPY = $HAVE_BOOST_NUMPY" >> $config_site_local echo "HAVE_BOOST_PYTHON_NUMPY = $HAVE_BOOST_PYTHON_NUMPY" >> $config_site_local - echo "PYTHON_VERSION = $PVAPY_MAJOR_MINOR_VERSION" >> $config_site_local + echo "PYTHON_VERSION = $PYTHON_MAJOR_MINOR_VERSION" >> $config_site_local echo "PVAPY_PYTHON = $PVAPY_PYTHON" >> $config_site_local echo "PVAPY_PYTHONPATH = $PVAPY_PYTHONPATH" >> $config_site_local echo "PVAPY_LD_LIBRARY_PATH = $PVAPY_LD_LIBRARY_PATH" >> $config_site_local @@ -208,7 +212,7 @@ AC_DEFUN([AX_PVAPY], echo "PVAPY_EPICS_BASE = $EPICS_BASE" >> $config_site_local echo "PVAPY_EPICS4_DIR = $EPICS4_DIR" >> $config_site_local echo "PVAPY_HOST_ARCH = $PVAPY_HOST_ARCH" >> $config_site_local - echo "PVAPY_SETUP_SH = $PWD/bin/$PVAPY_HOST_ARCH/pvapy_setup_full.$PVAPY_MAJOR_MINOR_VERSION.sh" >> $config_site_local + echo "PVAPY_SETUP_SH = $PWD/bin/$PVAPY_HOST_ARCH/pvapy_setup_full.$PYTHON_MAJOR_MINOR_VERSION.sh" >> $config_site_local AC_MSG_NOTICE([Created $config_site_local file]) # create setup files @@ -217,25 +221,33 @@ AC_DEFUN([AX_PVAPY], # create SETUP_PYTHONPATH.SH setup_sh=$PVAPY_TOP/configure/SETUP_PYTHONPATH.SH - setup_sh_local=$LOCAL_SETUP_DIR/pvapy_setup_pythonpath.$PVAPY_MAJOR_MINOR_VERSION.sh + setup_sh_local=$LOCAL_SETUP_DIR/pvapy_setup_pythonpath.$PYTHON_MAJOR_MINOR_VERSION.sh eval "cat $setup_sh | sed 's?PVAPY_PYTHON_DIR?$PVAPY_PYTHON_DIR?g' | sed 's?PVAPY_PYTHONPATH?$PVAPY_PYTHONPATH?g' | sed 's?PVAPY_LD_LIBRARY_PATH?$PVAPY_LD_LIBRARY_PATH?g' > $setup_sh_local" AC_MSG_NOTICE([Created $setup_sh_local file]) # create SETUP_FULL.SH setup_sh=$PVAPY_TOP/configure/SETUP_FULL.SH - setup_sh_local=$LOCAL_SETUP_DIR/pvapy_setup_full.$PVAPY_MAJOR_MINOR_VERSION.sh + setup_sh_local=$LOCAL_SETUP_DIR/pvapy_setup_full.$PYTHON_MAJOR_MINOR_VERSION.sh eval "cat $setup_sh | sed 's?PVAPY_PYTHON_DIR?$PVAPY_PYTHON_DIR?g' | sed 's?PVAPY_PYTHONPATH?$PVAPY_PYTHONPATH?g' | sed 's?PVAPY_LD_LIBRARY_PATH?$PVAPY_LD_LIBRARY_PATH?g' | sed 's?export PVAPY_SPHINX_BUILD.*?export PVAPY_SPHINX_BUILD=$PVAPY_SPHINX_BUILD?g' > $setup_sh_local" AC_MSG_NOTICE([Created $setup_sh_local file]) # create SETUP_PYTHONPATH.CSH setup_csh=$PVAPY_TOP/configure/SETUP_PYTHONPATH.CSH - setup_csh_local=$LOCAL_SETUP_DIR/pvapy_setup_pythonpath.$PVAPY_MAJOR_MINOR_VERSION.csh + setup_csh_local=$LOCAL_SETUP_DIR/pvapy_setup_pythonpath.$PYTHON_MAJOR_MINOR_VERSION.csh eval "cat $setup_csh | sed 's?PVAPY_PYTHON_DIR?$PVAPY_PYTHON_DIR?g' | sed 's?PVAPY_PYTHONPATH?$PVAPY_PYTHONPATH?g' | sed 's?PVAPY_LD_LIBRARY_PATH?$PVAPY_LD_LIBRARY_PATH?g' > $setup_csh_local" AC_MSG_NOTICE([Created $setup_csh_local file]) # create SETUP_FULL.CSH setup_csh=$PVAPY_TOP/configure/SETUP_FULL.CSH - setup_csh_local=$LOCAL_SETUP_DIR/pvapy_setup_full.$PVAPY_MAJOR_MINOR_VERSION.csh + setup_csh_local=$LOCAL_SETUP_DIR/pvapy_setup_full.$PYTHON_MAJOR_MINOR_VERSION.csh eval "cat $setup_csh | sed 's?PVAPY_PYTHON_DIR?$PVAPY_PYTHON_DIR?g' | sed 's?PVAPY_PYTHONPATH?$PVAPY_PYTHONPATH?g' | sed 's?PVAPY_LD_LIBRARY_PATH?$PVAPY_LD_LIBRARY_PATH?g' | sed 's?setenv PVAPY_SPHINX_BUILD.*?setenv PVAPY_SPHINX_BUILD $PVAPY_SPHINX_BUILD?g' > $setup_csh_local" AC_MSG_NOTICE([Created $setup_csh_local file]) + + # configure pvaccess module + cd $PVAPY_TOP/pvaccess > /dev/null + rm -f pvaccess.so + ln -s $PVAPY_PYTHONPATH/pvaccess.so . + cd $current_dir > /dev/null + AC_MSG_NOTICE([Created link $PVAPY_PYTHONPATH/pvaccess.so]) ]) + diff --git a/tools/autoconf/m4/ax_python_devel.m4 b/tools/autoconf/m4/ax_python_devel.m4 index e563a708..ecb45b9b 100644 --- a/tools/autoconf/m4/ax_python_devel.m4 +++ b/tools/autoconf/m4/ax_python_devel.m4 @@ -191,7 +191,7 @@ EOD` ac_python_version=$PYTHON_VERSION else ac_python_version=`$PYTHON -c "import sys; \ - print (sys.version[[:3]])"` + print('.'.join(sys.version.split()[[0]].split('.')[[0:2]]))"` fi fi diff --git a/tools/pip/epics-base-pip/Makefile b/tools/pip/epics-base-pip/Makefile index 79b2be35..6b39442c 100644 --- a/tools/pip/epics-base-pip/Makefile +++ b/tools/pip/epics-base-pip/Makefile @@ -14,6 +14,9 @@ build: configure python setup.py build_ext clean: - rm -rf $(BUILD_DIR) $(DIST_DIR) $(PACKAGE_DIR) + rm -rf $(BUILD_DIR) $(PACKAGE_DIR) *.egg-info -distclean: clean +tidy: clean + rm -rf $(DIST_DIR) + +distclean: tidy diff --git a/tools/pip/pvapy-boost-pip/Makefile b/tools/pip/pvapy-boost-pip/Makefile index 24616250..d3bacd4e 100644 --- a/tools/pip/pvapy-boost-pip/Makefile +++ b/tools/pip/pvapy-boost-pip/Makefile @@ -14,6 +14,9 @@ build: configure python setup.py build_ext clean: - rm -rf $(BUILD_DIR) $(DIST_DIR) $(PACKAGE_DIR) + rm -rf $(BUILD_DIR) $(PACKAGE_DIR) *.egg-info -distclean: clean +tidy: clean + rm -rf $(DIST_DIR) + +distclean: tidy diff --git a/tools/pip/pvapy-boost-pip/build.linux.sh b/tools/pip/pvapy-boost-pip/build.linux.sh index be8801b7..6e38dd3c 100755 --- a/tools/pip/pvapy-boost-pip/build.linux.sh +++ b/tools/pip/pvapy-boost-pip/build.linux.sh @@ -23,6 +23,7 @@ BOOST_DOWNLOAD_VERSION=`echo ${BOOST_VERSION} | sed 's?\.?_?g'` BOOST_DOWNLOAD_URL=https://sourceforge.net/projects/boost/files/boost/$BOOST_VERSION/boost_${BOOST_DOWNLOAD_VERSION}.tar.gz mkdir -p $BUILD_SAVE_DIR +mkdir -p $BOOST_DIR mkdir -p $BUILD_DIR cd $BUILD_DIR @@ -103,4 +104,4 @@ done # Save build so we can reuse it BOOST_SAVE_DIR=$BUILD_SAVE_DIR/pvapy-boost-${BOOST_VERSION}-py${PYTHON_MAJOR_MINOR_VERSION} -rsync -arlP $BOOST_DIR/ $BOOST_SAVE_DIR/ +rsync -arlP --exclude 'cmake' $BOOST_DIR/ $BOOST_SAVE_DIR/ diff --git a/tools/pip/pvapy-pip/Makefile b/tools/pip/pvapy-pip/Makefile index 84b780f8..7572e069 100644 --- a/tools/pip/pvapy-pip/Makefile +++ b/tools/pip/pvapy-pip/Makefile @@ -17,7 +17,11 @@ build: configure test: ./run_test.sh + clean: - rm -rf $(BUILD_DIR) $(DIST_DIR) $(PACKAGE_DIRS) MANIFEST + rm -rf $(BUILD_DIR) $(PACKAGE_DIRS) MANIFEST *.egg-info + +tidy: clean + rm -rf $(DIST_DIR) -distclean: clean +distclean: tidy diff --git a/tools/pip/pvapy-pip/build.linux.sh b/tools/pip/pvapy-pip/build.linux.sh index 4a8ed15a..36959192 100755 --- a/tools/pip/pvapy-pip/build.linux.sh +++ b/tools/pip/pvapy-pip/build.linux.sh @@ -111,11 +111,8 @@ rsync -arvl documentation/sphinx/_build/html $PVACCESS_DOC_DIR/ echo "Copying data files" rsync -arvl README.md $PVACCESS_DOC_DIR/ -echo "Installing pvapy library" -rsync -arv $PVACCESS_BUILD_LIB_DIR/$PVACCESS_LIB $PVACCESS_DIR/ - echo "Copying module files" -rsync -arvl pvapy pvaccess $TOP_DIR/ +rsync -arvl --exclude '*.so' pvapy pvaccess $TOP_DIR/ echo "Updating python module init files" for f in $PVACCESS_DIR/__init__.py $PVAPY_DIR/__init__.py; do @@ -123,6 +120,9 @@ for f in $PVACCESS_DIR/__init__.py $PVAPY_DIR/__init__.py; do eval $cmd done +echo "Installing pvaccess library" +rsync -arv $PVACCESS_BUILD_LIB_DIR/$PVACCESS_LIB $PVACCESS_DIR/ + echo "Copying dependencies" EPICS_LIBS=`ls -c1 $EPICS_BASE_DIR/lib/$EPICS_HOST_ARCH/*.so` BOOST_LIBS=`ls -c1 $BOOST_DIR/lib/$BOOST_HOST_ARCH/*.so` diff --git a/tools/pip/pvapy-pip/run_test.sh b/tools/pip/pvapy-pip/run_test.sh index ff544681..1cc6df69 100755 --- a/tools/pip/pvapy-pip/run_test.sh +++ b/tools/pip/pvapy-pip/run_test.sh @@ -7,7 +7,7 @@ echo "Starting test server" python testServer.py 30 & echo "Starting tests" -nosetests -sv +nose2 -v wait echo "Tests done"