From 782b5d1f125b7aae9b6b59a4eb601dc5f46fa3a0b3783f5163e9fc4a70c47758 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Mon, 8 Apr 2024 11:18:28 +0000 Subject: [PATCH] - Don't modify files at %check state, bsc#1222349 - Do not distribute any test file. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-libarchive?expand=0&rev=18 --- python-libarchive.changes | 6 ++++++ python-libarchive.spec | 15 ++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/python-libarchive.changes b/python-libarchive.changes index 8adabd2..018c35f 100644 --- a/python-libarchive.changes +++ b/python-libarchive.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Apr 8 10:51:54 UTC 2024 - Daniel Garcia + +- Don't modify files at %check state, bsc#1222349 +- Do not distribute any test file. + ------------------------------------------------------------------- Wed Aug 12 09:31:58 UTC 2020 - pgajdos@suse.com diff --git a/python-libarchive.spec b/python-libarchive.spec index aeec995..efc5418 100644 --- a/python-libarchive.spec +++ b/python-libarchive.spec @@ -1,7 +1,7 @@ # # spec file for package python-libarchive # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %define oldpython python Name: python-libarchive Version: 0.4.7 @@ -48,16 +47,17 @@ A ctypes-based adapter to libarchive. 7-Zip is supported for both reading and writing. %prep -%setup -q -n libarchive-%{version} -%autopatch -p1 +%autosetup -p1 -n libarchive-%{version} +# do not distribute any test file +sed -i "s/'tests'/'tests','tests.adapters','tests.types'/" setup.py +# test_read_symlinks expects README.rst to be symlink +ln -sf libarchive/resources/README.rst README.rst %build %python_build %check export LANG=en_US.UTF8 -# test_read_symlinks expects README.rst to be symlink -ln -sf libarchive/resources/README.rst README.rst %pytest %install @@ -67,6 +67,7 @@ ln -sf libarchive/resources/README.rst README.rst %files %{python_files} %doc README.rst %license LICENSE -%{python_sitelib}/* +%{python_sitelib}/libarchive +%{python_sitelib}/libarchive-%{version}*-info %changelog