diff --git a/.github/workflows/ci-scripts-build.yml b/.github/workflows/ci-scripts-build.yml index f77157b..c400628 100644 --- a/.github/workflows/ci-scripts-build.yml +++ b/.github/workflows/ci-scripts-build.yml @@ -15,52 +15,93 @@ jobs: runs-on: ${{ matrix.os }} # Set environment variables from matrix parameters env: + CMP: ${{ matrix.cmp }} + BCFG: ${{ matrix.configuration }} BASE: ${{ matrix.base }} PROF: ${{ matrix.profile }} EXTRA: ${{ matrix.extra }} TEST: ${{ matrix.test }} + VV: "1" strategy: fail-fast: false matrix: include: - os: ubuntu-latest + cmp: gcc + configuration: default base: "7.0" python: "2.7" profile: deb8 test: yes - os: ubuntu-latest + cmp: gcc + configuration: default base: "7.0" python: "2.7" profile: deb8 test: yes - os: ubuntu-latest + cmp: gcc + configuration: default base: "7.0" python: "3.7" profile: deb10 test: yes - os: ubuntu-latest + cmp: gcc + configuration: default base: "7.0" python: "3.8" profile: latest test: yes - os: ubuntu-latest + cmp: gcc + configuration: default base: "7.0" python: "3.9" profile: latest test: yes - os: ubuntu-latest + cmp: gcc + configuration: default + base: "7.0" + python: "3.10" + profile: latest + test: yes + + - os: macos-latest + cmp: gcc + configuration: default + base: "7.0" + python: "3.10" + profile: latest + test: yes + + - os: windows-latest + cmp: vs2019 + configuration: debug + base: "7.0" + python: "3.10" + profile: latest + test: yes + + - os: ubuntu-latest + cmp: gcc + configuration: default base: "3.15" python: "2.7" profile: deb8 test: yes - os: ubuntu-latest + cmp: gcc + configuration: default base: "3.14" python: "2.7" profile: deb8 @@ -74,6 +115,7 @@ jobs: with: python-version: ${{ matrix.python }} - name: More Setup Python + shell: bash run: | python --version python -m pip --version @@ -83,6 +125,13 @@ jobs: EOF echo === configure/CONFIG_SITE.local === cat configure/CONFIG_SITE.local + - name: makehelper.py + run: python makehelper.py + - name: DSOs + shell: bash + run: find ${Python_ROOT_DIR} -name '*.dll' -o -name '*.so' -o -name '*.dylib' + - name: get_config_vars + run: python -c 'from sysconfig import get_config_vars; from pprint import pprint; pprint(get_config_vars())' - name: Prepare and compile dependencies run: python .ci/cue.py prepare - name: Build main module diff --git a/devsupApp/src/Makefile b/devsupApp/src/Makefile index 3a26547..4968e84 100644 --- a/devsupApp/src/Makefile +++ b/devsupApp/src/Makefile @@ -29,6 +29,8 @@ _dbapi_SRCS += utest.c _dbapi_SRCS += pyDevSupCommon_registerRecordDeviceDriver.cpp _dbapi_LIBS += $(EPICS_BASE_IOC_LIBS) +_dbapi_SYS_LIBS_WIN32 += python$(PY_LD_VER) +_dbapi_SYS_LIBS_WIN32 += ws2_32 Advapi32 Dbghelp PY += devsup/__init__.py PY += devsup/db.py @@ -61,7 +63,7 @@ pyconfig: ifneq (,$(T_A)) nose: - PYTHONPATH="${PYTHONPATH}:$(abspath $(TOP))/python$(PY_LD_VER)/$(EPICS_HOST_ARCH)" $(PYTHON) -m nose -P devsup $(NOSEFLAGS) + PYTHONPATH="${PYTHONPATH}:$(abspath $(TOP))/python$(PY_LD_VER)/$(EPICS_HOST_ARCH)" $(PYTHON) -m nose2 -v devsup $(NOSEFLAGS) # bounce back down to the sphinx generated Makefile # aren't Makefiles fun... diff --git a/devsupApp/src/dbapi.c b/devsupApp/src/dbapi.c index 2dab153..f859cd6 100644 --- a/devsupApp/src/dbapi.c +++ b/devsupApp/src/dbapi.c @@ -278,7 +278,7 @@ static struct PyMethodDef dbapimethod[] = { "Execute IOC shell script or command"}, {"dbReadDatabase", (PyCFunction)py_dbReadDatabase, METH_VARARGS|METH_KEYWORDS, "Load EPICS database file"}, - {"iocInit", (PyCFunction)py_iocInit, METH_NOARGS, + {"iocInit", (PyCFunction)py_iocInit, METH_VARARGS|METH_KEYWORDS, "Initialize IOC"}, {"_dbd_setup", (PyCFunction)pyDBD_setup, METH_NOARGS, ""}, {"_dbd_rrd_base", (PyCFunction)py_pyDevSupCommon, METH_NOARGS, ""}, diff --git a/devsupApp/src/dbdset.c b/devsupApp/src/dbdset.c index 68d76e4..954d0c5 100644 --- a/devsupApp/src/dbdset.c +++ b/devsupApp/src/dbdset.c @@ -24,6 +24,7 @@ #include #include "pydevsup.h" +#include static int inshutdown; @@ -449,7 +450,8 @@ static long python_asub(aSubRecord* prec) } /* uglyness to detect aSubRecord */ -extern rset* pvar_rset_aSubRSET; +epicsShareExtern +rset* pvar_rset_aSubRSET; int isPyRecord(dbCommon *prec) { diff --git a/makehelper.py b/makehelper.py index ef36d63..ed0c0a0 100644 --- a/makehelper.py +++ b/makehelper.py @@ -14,7 +14,6 @@ from __future__ import print_function import sys -import errno import os if len(sys.argv)<2: @@ -26,10 +25,18 @@ pass out = open(sys.argv[1], 'w') -from distutils.sysconfig import get_config_var, get_python_inc +from sysconfig import get_config_var +try: + from distutils.sysconfig import get_python_inc +except ImportError: + def get_python_inc(): + return get_config_var('INCLUDEPY') or '' incdirs = [get_python_inc()] -libdir = get_config_var('LIBDIR') or '' +libdirs = [ + get_config_var('LIBDIR') or get_config_var('LIBDEST') or '', + get_config_var('BINDIR') or '', +] have_np='NO' try: @@ -39,8 +46,8 @@ except ImportError: pass -print('TARGET_CFLAGS +=',get_config_var('BASECFLAGS'), file=out) -print('TARGET_CXXFLAGS +=',get_config_var('BASECFLAGS'), file=out) +print('TARGET_CFLAGS +=',get_config_var('BASECFLAGS') or '', file=out) +print('TARGET_CXXFLAGS +=',get_config_var('BASECFLAGS') or '', file=out) print('PY_VER :=',get_config_var('VERSION'), file=out) ldver = get_config_var('LDVERSION') @@ -50,7 +57,8 @@ ldver = ldver+'_d' print('PY_LD_VER :=',ldver, file=out) print('PY_INCDIRS :=',' '.join(incdirs), file=out) -print('PY_LIBDIRS :=',libdir, file=out) +print('PY_LIBDIRS :=',' '.join(libdirs), file=out) +print('PY_LDLIBS :=', get_config_var('BLDLIBRARY') or '', file=out) print('HAVE_NUMPY :=',have_np, file=out) try: diff --git a/requirements-deb10.txt b/requirements-deb10.txt index 382bf56..91aeff2 100644 --- a/requirements-deb10.txt +++ b/requirements-deb10.txt @@ -1,2 +1,3 @@ numpy==1.16.2 -nose==1.3.7 +#nose==1.3.7 +nose2 diff --git a/requirements-deb7.txt b/requirements-deb7.txt index 84d50dc..b143719 100644 --- a/requirements-deb7.txt +++ b/requirements-deb7.txt @@ -1,2 +1,3 @@ numpy==1.6.2 -nose==1.1.2 +#nose==1.1.2 +nose2 diff --git a/requirements-deb8.txt b/requirements-deb8.txt index 135f812..46ac10a 100644 --- a/requirements-deb8.txt +++ b/requirements-deb8.txt @@ -1,2 +1,3 @@ numpy==1.8.2 -nose==1.3.4 +#nose==1.3.4 +nose2 diff --git a/requirements-deb9.txt b/requirements-deb9.txt index d3e0a04..90d1c74 100644 --- a/requirements-deb9.txt +++ b/requirements-deb9.txt @@ -1,2 +1,3 @@ numpy==1.12.1 -nose==1.3.7 +#nose==1.3.7 +nose2 diff --git a/requirements-latest.txt b/requirements-latest.txt index 02e0c84..99ce0ab 100644 --- a/requirements-latest.txt +++ b/requirements-latest.txt @@ -1,2 +1,2 @@ numpy -nose +nose2