Rebuild with python 3.14

This commit is contained in:
2026-05-06 21:02:45 +03:00
parent 09db2d68f9
commit 749dbd02b1
4 changed files with 45 additions and 7 deletions
+3 -2
View File
@@ -1,7 +1,7 @@
name: python-magic name: python-magic
description: A python wrapper for libmagic description: A python wrapper for libmagic
version: 0.4.27 version: 0.4.27
revision: 1 revision: 2
url: https://github.com/ahupp/python-magic url: https://github.com/ahupp/python-magic
license: MIT license: MIT
architecture: any architecture: any
@@ -9,12 +9,13 @@ output_architecture: any
type: source type: source
depends: depends:
- file - file
- python3 - python3=3.14.*
make_depends: make_depends:
- python-build - python-build
- python-installer - python-installer
- python-setuptools - python-setuptools
- python-wheel - python-wheel
check_depends:
- python-pytest - python-pytest
downloads: downloads:
- url: https://github.com/ahupp/python-magic/archive/refs/tags/${BPM_PKG_VERSION}.tar.gz - url: https://github.com/ahupp/python-magic/archive/refs/tags/${BPM_PKG_VERSION}.tar.gz
+8
View File
@@ -0,0 +1,8 @@
96c96
< 'test.snappy.parquet': 'application/octet-stream',
---
> 'test.snappy.parquet': 'application/vnd.apache.parquet',
127c127
< 'test.snappy.parquet': ('Apache Parquet', 'Par archive data'),
---
> 'test.snappy.parquet': ('Apache Parquet file', 'Par archive data'),
+32 -4
View File
@@ -1,7 +1,33 @@
From 545a2a561522efc2869066792062694b59b1b39c Mon Sep 17 00:00:00 2001 https://github.com/ahupp/python-magic/commit/4ffcd59113fa26d7c2e9d5897b1eef919fd4b457
From 4ffcd59113fa26d7c2e9d5897b1eef919fd4b457 Mon Sep 17 00:00:00 2001
From: Adam Hupp <[email protected]>
Date: Mon, 9 Jan 2023 12:55:15 -0800
Subject: [PATCH] update test for upstream added gzip extensions
--- a/test/python_magic_test.py
+++ b/test/python_magic_test.py
@@ -134,7 +134,7 @@ def test_extension(self):
self.assert_values(m, {
# some versions return '' for the extensions of a gz file,
# including w/ the command line. Who knows...
- 'test.gz': ('gz/tgz/tpz/zabw/svgz', '', '???'),
+ 'test.gz': ('gz/tgz/tpz/zabw/svgz/adz/kmy/xcfgz', 'gz/tgz/tpz/zabw/svgz', '', '???'),
'name_use.jpg': 'jpeg/jpg/jpe/jfif',
})
except NotImplementedError:
@@ -227,6 +227,5 @@ def test_pathlike(self):
m = magic.Magic(mime=True)
self.assertEqual('application/pdf', m.from_file(path))
-
if __name__ == '__main__':
unittest.main()
From b434c88c9c8e901adf5b3779e3aac65f10d90aab Mon Sep 17 00:00:00 2001
From: Dominique Leuenberger <[email protected]> From: Dominique Leuenberger <[email protected]>
Date: Wed, 2 Aug 2023 11:29:47 +0200 Date: Wed, 2 Aug 2023 11:29:47 +0200
Subject: [PATCH] Fix test suite with file 5.45 Subject: [PATCH 1/2] Fix test suite with file 5.45
[ 12s] test/python_magic_test.py:53: in assert_values [ 12s] test/python_magic_test.py:53: in assert_values
[ 12s] self.assertIn(value, expected_value) [ 12s] self.assertIn(value, expected_value)
@@ -25,10 +51,10 @@ index 5719a58..7b4665b 100644
def assert_result(self, result): def assert_result(self, result):
self.assertEqual(result.mime_type, self.expected_mime_type) self.assertEqual(result.mime_type, self.expected_mime_type)
diff --git a/test/python_magic_test.py b/test/python_magic_test.py diff --git a/test/python_magic_test.py b/test/python_magic_test.py
index d51587c..410a149 100755 index 624a443..78f63a3 100755
--- a/test/python_magic_test.py --- a/test/python_magic_test.py
+++ b/test/python_magic_test.py +++ b/test/python_magic_test.py
@@ -108,7 +108,8 @@ def test_descriptions(self): @@ -108,7 +108,8 @@ class MagicTest(unittest.TestCase):
self.assert_values(m, { self.assert_values(m, {
'magic._pyc_': 'python 2.4 byte-compiled', 'magic._pyc_': 'python 2.4 byte-compiled',
'test.pdf': ('PDF document, version 1.2', 'test.pdf': ('PDF document, version 1.2',
@@ -38,3 +64,5 @@ index d51587c..410a149 100755
'test.gz': 'test.gz':
('gzip compressed data, was "test", from Unix, last ' ('gzip compressed data, was "test", from Unix, last '
'modified: Sun Jun 29 01:32:52 2008', 'modified: Sun Jun 29 01:32:52 2008',
--
2.43.0
+2 -1
View File
@@ -7,6 +7,7 @@
prepare() { prepare() {
cd "$BPM_SOURCE" cd "$BPM_SOURCE"
patch -Np1 -i "$BPM_WORKDIR"/fix-test-suite.patch patch -Np1 -i "$BPM_WORKDIR"/fix-test-suite.patch
patch -i "$BPM_WORKDIR"/file-5.47-fix.diff test/python_magic_test.py
} }
# The build function is executed in the source directory # The build function is executed in the source directory
@@ -18,7 +19,7 @@ build() {
# The check function is executed in the source directory # The check function is executed in the source directory
# This function is used to run tests to verify the package has been compiled correctly # This function is used to run tests to verify the package has been compiled correctly
check() { check() {
LC_ALL=en_US.UTF-8 pytest --deselect test/python_magic_test.py::MagicTest::test_extension LC_ALL=en_US.UTF-8 pytest
} }
# The package function is executed in the source directory # The package function is executed in the source directory