$OpenBSD: patch-telegram_tdjson_py,v 1.1.1.1 2021/06/09 10:43:16 landry Exp $

use system tdjson, not the bundled one

Index: telegram/tdjson.py
--- telegram/tdjson.py.orig
+++ telegram/tdjson.py
@@ -2,6 +2,7 @@ import json
 import logging
 import platform
 from ctypes import CDLL, CFUNCTYPE, c_int, c_char_p, c_double, c_void_p, c_longlong
+from ctypes.util import find_library
 from typing import Any, Dict, Optional, Union
 
 import pkg_resources
@@ -10,12 +11,7 @@ logger = logging.getLogger(__name__)
 
 
 def _get_tdjson_lib_path() -> str:
-    if platform.system().lower() == 'darwin':
-        lib_name = 'darwin/libtdjson.dylib'
-    else:
-        lib_name = 'linux/libtdjson.so'
-
-    return pkg_resources.resource_filename('telegram', f'lib/{lib_name}')
+    return find_library('tdjson')
 
 
 class TDJson:
