summaryrefslogtreecommitdiff
path: root/multimedia/py-subliminal/files
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/py-subliminal/files')
-rw-r--r--multimedia/py-subliminal/files/patch-pyproject.toml10
-rw-r--r--multimedia/py-subliminal/files/patch-tests31
2 files changed, 31 insertions, 10 deletions
diff --git a/multimedia/py-subliminal/files/patch-pyproject.toml b/multimedia/py-subliminal/files/patch-pyproject.toml
deleted file mode 100644
index b71bc0bb7ec7..000000000000
--- a/multimedia/py-subliminal/files/patch-pyproject.toml
+++ /dev/null
@@ -1,10 +0,0 @@
---- pyproject.toml.orig 2024-06-25 06:59:42 UTC
-+++ pyproject.toml
-@@ -1,6 +1,6 @@
- # https://peps.python.org/pep-0517/
- [build-system]
--requires = ["setuptools>=64"]
-+requires = ["setuptools>=63"]
- build-backend = "setuptools.build_meta"
-
- # https://peps.python.org/pep-0621/
diff --git a/multimedia/py-subliminal/files/patch-tests b/multimedia/py-subliminal/files/patch-tests
new file mode 100644
index 000000000000..96e42c41f818
--- /dev/null
+++ b/multimedia/py-subliminal/files/patch-tests
@@ -0,0 +1,31 @@
+Fix windows dependency
+
+--- pyproject.toml.orig 2025-05-02 15:15:36 UTC
++++ pyproject.toml
+@@ -73,7 +73,7 @@ tests = [
+ "sympy",
+ "colorama", # used in scripts/
+ "vcrpy>=5", # keep synchronized with docs dependencies
+- "win32-setctime",
++ "win32-setctime; sys_platform == 'win32'",
+ "importlib_metadata>=4.6; python_version<'3.10'",
+ ]
+ types = [
+
+--- tests/test_video.py.orig 2025-05-02 16:03:05 UTC
++++ tests/test_video.py
+@@ -7,7 +7,13 @@ import pytest
+ from unittest.mock import Mock
+
+ import pytest
+-from win32_setctime import SUPPORTED, setctime
++# Conditional import of win32_setctime
++try:
++ from win32_setctime import SUPPORTED, setctime
++except ImportError:
++ # Define default values if the import fails (we are on non-Windows or it's not installed)
++ SUPPORTED = False
++ setctime = None # Or a dummy function if preferred: def setctime(*args, **kwargs): pass
+
+ from subliminal.utils import sanitize, timestamp
+ from subliminal.video import Episode, Movie, Video