Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/elfmz/far2l.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Argirov <anton.argirov@gmail.com>2020-10-05 21:18:30 +0300
committerAnton Argirov <anton.argirov@gmail.com>2020-10-05 21:18:30 +0300
commit3aa6deb87547da8df3a4e9ff9ac16ed5350e7153 (patch)
tree3f773f73b2dbbaae4a653a5663682e8626d6348c /python/configs/plug
parentdca5331999f74320735f78dbe9244445194e61cf (diff)
Make python plugin consistently build and work both on Linux & MacOS platforms (if enabled)
Diffstat (limited to 'python/configs/plug')
-rw-r--r--python/configs/plug/far2l/pluginmanager.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/python/configs/plug/far2l/pluginmanager.py b/python/configs/plug/far2l/pluginmanager.py
index 172d7506..0a6c0ca0 100644
--- a/python/configs/plug/far2l/pluginmanager.py
+++ b/python/configs/plug/far2l/pluginmanager.py
@@ -1,5 +1,6 @@
import os
import cffi
+from sys import platform
from . import rpdb
def installffi(ffi):
@@ -11,13 +12,13 @@ def installffi(ffi):
'farkeys.hpp',
'plugin.hpp'
):
- data = open(os.path.join(dname, fname), 'rt').read()
+ data = open(os.path.join(dname, fname), 'rt', encoding='utf-8').read()
ffi.cdef(data, packed=True)
ffi = cffi.FFI()
installffi(ffi)
#ffi.cdef(open(__file__+'.h', 'rt').read(), packed=True)
-ffic = ffi.dlopen('c')
+ffic = ffi.dlopen('c' if platform != 'darwin' else 'libSystem.dylib')
from . import (
udialog,