From e11c498291aad351652984cc7ebbccb3182f3217 Mon Sep 17 00:00:00 2001 From: Vadim Lebedev Date: Tue, 2 Aug 2022 14:33:58 +0200 Subject: [PATCH] Fixes for version number verification --- .github/workflows/build-wheels.yaml | 11 ++++------- libarchive/__init__.py | 4 ++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-wheels.yaml b/.github/workflows/build-wheels.yaml index 305070d..5e0c756 100644 --- a/.github/workflows/build-wheels.yaml +++ b/.github/workflows/build-wheels.yaml @@ -12,11 +12,6 @@ jobs: runs-on: ubuntu-latest container: quay.io/pypa/manylinux2014_x86_64 steps: - - name: Status - run: | - git status - ls -lR - - uses: actions/checkout@v2 - name: Print System Information @@ -74,9 +69,11 @@ jobs: - name: Mini test run: | cd /tmp - python3 -c 'import libarchive; print(libarchive._libarchive.ARCHIVE_VERSION_STRING.split()[1])' \ + python3 -c 'import libarchive; print(libarchive.version())' \ | tee strace.out - + find / -name 'libarchive*.so' | xargs ls -l + find / -name 'libarchive*.so' | xargs strings | grep 'libarchive' + - name: version run: | diff --git a/libarchive/__init__.py b/libarchive/__init__.py index 8ad5653..7af2342 100644 --- a/libarchive/__init__.py +++ b/libarchive/__init__.py @@ -94,6 +94,10 @@ class EOF(Exception): pass +def version(): + '''Returns the version of the libarchive library.''' + return _libarchive.ARCHIVE_VERSION_STRING.split()[1] + def get_error(archive): '''Retrieves the last error description for the given archive instance.'''