Skip to content

Commit b108cb4

Browse files
add support for older libmpv version on linux platform
1 parent edf172e commit b108cb4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

setup.py

+6
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import platform
2424
from setuptools import Extension, setup
2525
from Cython.Build import cythonize
26+
import ctypes.util
2627

2728
system = platform.system().lower()
2829

@@ -53,6 +54,11 @@
5354

5455
extension_src = "pympv/mpv.pyx"
5556

57+
if system == "linux":
58+
mpv_so = ctypes.util.find_library("mpv")
59+
if mpv_so == "libmpv.so.1":
60+
extension_src = "pympv/pympv-0.7.1/mpv.pyx"
61+
5662
if library_path is None:
5763
extensions = [Extension("mpv", [extension_src], libraries=["mpv"])]
5864
else:

0 commit comments

Comments
 (0)