Test cases for python-magic

OBS-URL: https://build.opensuse.org/package/show/Base:System/file?expand=0&rev=265
This commit is contained in:
Dr. Werner Fink 2023-01-10 13:29:59 +00:00 committed by Git OBS Bridge
parent 98abbe70cf
commit 28e3ba9cec
4 changed files with 22 additions and 3 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jan 10 13:28:51 UTC 2023 - Dr. Werner Fink <werner@suse.de>
- Use [Pp]atch0 explicit to avoid warning as python.magic build time
-------------------------------------------------------------------
Mon Jan 9 14:30:30 UTC 2023 - Dr. Werner Fink <werner@suse.de>

View File

@ -44,7 +44,7 @@ Source2: baselibs.conf
Source3: file-rpmlintrc
Source4: https://www.astron.com/pub/file/file-%{version}.tar.gz.asc
Source5: file.keyring
Patch: file-5.44.dif
Patch0: file-5.44.dif
Patch1: file-5.19-misc.dif
Patch4: file-4.24-autoconf.dif
Patch5: file-5.14-tex.dif
@ -125,8 +125,7 @@ to develop applications that require the magic "file" interface.
%patch32 -p0 -b .clicfs
%patch37 -p1 -b .getenv
%patch39 -p1 -b .btrfs
%patch -b .0
%patch0 -b .0
test -s src/magic.h.in || cp -p src/magic.h src/magic.h.in
rm -fv src/magic.h

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jan 10 13:28:15 UTC 2023 - Dr. Werner Fink <werner@suse.de>
- Enable tests for python-magic (not python-python-magic)
-------------------------------------------------------------------
Tue Jan 10 08:29:12 UTC 2023 - Dr. Werner Fink <werner@suse.de>

View File

@ -28,6 +28,7 @@ License: BSD-3-Clause AND BSD-4-Clause
Group: Development/Languages/Python
URL: https://www.darwinsys.com/file/
Source99: file.spec
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: findutils
BuildRequires: libtool
@ -55,6 +56,15 @@ pushd python
%python_install
popd
%check
export LC_ALL=C.UTF-8
pushd python
%python_flavored_alternatives
%{python_expand # indicate a writeable .pth directory for tests
python%{$python_version} setup.py test
}
popd
%files %{python_files}
%doc python/README python/example.py
%{python_sitelib}/magic.py*