diff --git a/appveyor.yml b/appveyor.yml index 5a63cb6..ba3904a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -205,6 +205,12 @@ environment: HOMEBREW_NO_INSTALL_CLEANUP: 1 PYTHON_VERSION: 3.12 TOXENV: py312 + - TARGET: linux-tox-py310 + BUILD_ENVIRONMENT: python-tox + APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2204 + PYTHON_VERSION: 3.10 + TOXENV: py310 + AUDITWHEEL_PLAT: manylinux_2_35_x86_64 - TARGET: cygwin64-gcc BUILD_ENVIRONMENT: cygwin64 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 @@ -243,11 +249,12 @@ environment: install: - cmd: if [%BUILD_ENVIRONMENT%]==[msbuild] ( git clone https://github.com/libyal/vstools.git ..\vstools ) -- sh: if test ${BUILD_ENVIRONMENT} = "python-tox" || test ${BUILD_ENVIRONMENT} = "xcode"; then brew update-reset && brew update -q; fi -- sh: if test ${BUILD_ENVIRONMENT} = "python-tox" || test ${BUILD_ENVIRONMENT} = "xcode"; then brew install -q autoconf automake gettext gnu-sed libtool pkg-config || true; fi +- sh: if ( test `uname -s` = "Darwin" && test ${BUILD_ENVIRONMENT} = "python-tox" ) || test ${BUILD_ENVIRONMENT} = "xcode"; then brew update-reset && brew update -q; fi +- sh: if ( test `uname -s` = "Darwin" && test ${BUILD_ENVIRONMENT} = "python-tox" ) || test ${BUILD_ENVIRONMENT} = "xcode"; then brew install -q autoconf automake gettext gnu-sed libtool pkg-config || true; fi - cmd: if [%BUILD_ENVIRONMENT%]==[python-tox] ( "%PYTHON%" -m pip install -U tox twine ) -- sh: if test ${BUILD_ENVIRONMENT} = "python-tox"; then brew install -q python@${PYTHON_VERSION} tox twine-pypi || true; fi +- sh: if test `uname -s` = "Darwin" && test ${BUILD_ENVIRONMENT} = "python-tox"; then brew install -q python@${PYTHON_VERSION} tox twine-pypi || true; fi +- sh: if test `uname -s` = "Linux" && test ${BUILD_ENVIRONMENT} = "python-tox"; then sudo apt-get update && sudo apt-get -y install autoconf automake autopoint build-essential git libtool patchelf pkg-config python3 python3-dev python3-distutils python3-pip python3-setuptools tox twine; fi - ps: If ($env:BUILD_ENVIRONMENT -eq "cygwin64") { (New-Object Net.WebClient).DownloadFile("https://cygwin.com/setup-x86_64.exe", "C:\\cygwin64\\setup-x86_64.exe") } - cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] ( @@ -272,7 +279,8 @@ build_script: - sh: if test ${BUILD_ENVIRONMENT} = "xcode"; then export PATH="/usr/local/opt/gettext/bin:$PATH"; export SED="/usr/local/bin/gsed"; tests/build.sh ${CONFIGURE_OPTIONS}; fi - cmd: if [%BUILD_ENVIRONMENT%]==[python-tox] ( "%PYTHON%" -m tox -e%TOXENV% ) -- sh: if test ${BUILD_ENVIRONMENT} = "python-tox"; then export PATH="/usr/local/opt/gettext/bin:$PATH"; export SED="/usr/local/bin/gsed"; ./synclibs.sh && ./autogen.sh && ./configure --disable-nls --disable-shared-libs && make sources >/dev/null && tox -e${TOXENV}; fi +- sh: if test `uname -s` = "Darwin" && test ${BUILD_ENVIRONMENT} = "python-tox"; then export PATH="/usr/local/opt/gettext/bin:$PATH"; export SED="/usr/local/bin/gsed"; ./synclibs.sh && ./autogen.sh && ./configure --disable-nls --disable-shared-libs && make sources >/dev/null && tox -e${TOXENV}; fi +- sh: if test `uname -s` = "Linux" && test ${BUILD_ENVIRONMENT} = "python-tox"; then ./synclibs.sh && ./autogen.sh && ./configure --disable-nls --disable-shared-libs && make sources >/dev/null && tox -e${TOXENV} && tox -eauditwheel -- --plat ${AUDITWHEEL_PLAT} dist/*.whl && rm -f dist/*.whl && mv wheelhouse/*.whl dist/; fi - cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] ( xcopy /i /q /s C:\projects\libscca C:\cygwin64\home\appveyor\libscca && C:\cygwin64\bin\bash -e -l -c "cd libscca && wget -q 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -O './config.guess' && wget -q 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -O './config.sub'" && diff --git a/configure.ac b/configure.ac index 57cab0e..cd6266f 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.71]) AC_INIT( [libscca], - [20240120], + [20240215], [joachim.metz@gmail.com]) AC_CONFIG_SRCDIR( diff --git a/tests/test_python_module.sh b/tests/test_python_module.sh index aa98639..b624257 100755 --- a/tests/test_python_module.sh +++ b/tests/test_python_module.sh @@ -1,10 +1,11 @@ #!/usr/bin/env bash # Tests Python module functions and types. # -# Version: 20231005 +# Version: 20240120 EXIT_SUCCESS=0; EXIT_FAILURE=1; +EXIT_NO_TESTS_RAN=5; EXIT_IGNORE=77; TEST_FUNCTIONS="support"; @@ -147,7 +148,11 @@ do test_python_function "${TEST_FUNCTION}"; RESULT=$?; - if test ${RESULT} -ne ${EXIT_SUCCESS}; + if test ${RESULT} -eq ${EXIT_NO_TESTS_RAN}; + then + RESULT=${EXIT_IGNORE}; + fi + if test ${RESULT} -ne ${EXIT_SUCCESS} && test ${RESULT} -ne ${EXIT_IGNORE}; then break; fi @@ -168,8 +173,11 @@ do test_python_function "${TEST_FUNCTION}"; RESULT=$?; fi - - if test ${RESULT} -ne ${EXIT_SUCCESS}; + if test ${RESULT} -eq ${EXIT_NO_TESTS_RAN}; + then + RESULT=${EXIT_IGNORE}; + fi + if test ${RESULT} -ne ${EXIT_SUCCESS} && test ${RESULT} -ne ${EXIT_IGNORE}; then break; fi diff --git a/tox.ini b/tox.ini index 0656d36..c3c20a3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py3{7,8,9,10,11,12} +envlist = auditwheel,py3{7,8,9,10,11,12} [testenv] usedevelop = True @@ -18,3 +18,12 @@ commands = python -m build --no-isolation --outdir=dist --wheel python -m pip install --no-index --find-links=dist libscca-python python tests/runtests.py + +[testenv:auditwheel] +usedevelop = True +pip_pre = True +deps = + auditwheel + setuptools >= 65 +commands = + python -m auditwheel repair {posargs}