Skip to content

Commit

Permalink
Allow get_include to handle sdist installations
Browse files Browse the repository at this point in the history
  • Loading branch information
JDBetteridge committed Nov 24, 2023
1 parent ab8a386 commit 8886485
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rtree/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ def free_error_msg_ptr(result, func, cargs):

def get_include():
import rtree

return os.path.join(os.path.dirname(rtree.__file__), "include")
from importlib import resources
include_dir = resources.files(rtree).joinpath('include')
return str(include_dir) if include_dir.is_dir() else ''


# load the shared library by looking in likely places
Expand Down

0 comments on commit 8886485

Please sign in to comment.