File: 0001-avoid-find_library.patch

package info (click to toggle)
python-ntruprime 0~20241021.4-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 148 kB
  • sloc: python: 281; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 717 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From: =?utf-8?b?SmFuIE1vasW+w63FoQ==?= <jan.mojzis@gmail.com>
Date: Tue, 4 Mar 2025 16:22:05 +0100
Subject: avoid find_library
Forwarded: not-needed

---
 src/ntruprime/_lib.py | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/ntruprime/_lib.py b/src/ntruprime/_lib.py
index 819f8c3..10a8585 100644
--- a/src/ntruprime/_lib.py
+++ b/src/ntruprime/_lib.py
@@ -1,10 +1,6 @@
-from ctypes.util import find_library as _find_library
 from ctypes import CDLL as _CDLL
 
-_libname = _find_library('ntruprime')
-if _libname is None:
-    raise FileNotFoundError("unable to locate library 'ntruprime'")
-_lib = _CDLL(_libname)
+_lib = _CDLL("libntruprime.so.1")
 
 
 def _check_input(x, xlen, name):