Skip to content

Commit eea21b0

Browse files
committed
Fix inclusion of lib
1 parent 3f0d7f5 commit eea21b0

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,5 @@ Homepage = "https://github.com/EarthyScience/RQADeforestation.py"
2121
[tool.setuptools]
2222
include-package-data = true
2323

24-
[tool.setuptools.packages.find]
25-
where = ["."]
26-
2724
[tool.setuptools.package-data]
28-
mypkg = ["*.so", "*.o"]
25+
"*" = ["*.so", "*.o"]

rqadeforestation/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import ctypes as ct
23
import numpy as np
34

@@ -22,7 +23,8 @@ def mmptr(A):
2223
a = MallocMatrix(ptr, ct.c_int64(A.size), ct.c_int64(A.shape[1]), ct.c_int64(A.shape[0]))
2324
return ct.byref(a)
2425

25-
filename = "lib/rqatrend.so"
26+
root_dir = os.path.dirname(os.path.abspath(__file__))
27+
filename = os.path.join(root_dir, "lib/rqatrend.so")
2628
lib = ct.CDLL(filename)
2729

2830
def rqatrend(y: np.ndarray, threshold: float, border: int = 10, theiler: int = 1) -> float:

0 commit comments

Comments
 (0)