Skip to content

Commit

Permalink
Applied updates
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Feb 15, 2024
1 parent b4cd455 commit 48029ad
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 10 deletions.
16 changes: 12 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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] (
Expand All @@ -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'" &&
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ AC_PREREQ([2.71])

AC_INIT(
[libscca],
[20240120],
[20240215],
[joachim.metz@gmail.com])

AC_CONFIG_SRCDIR(
Expand Down
16 changes: 12 additions & 4 deletions tests/test_python_module.sh
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
11 changes: 10 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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}

0 comments on commit 48029ad

Please sign in to comment.