Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search wheel first to find GDAL_DATA #898

Merged
merged 2 commits into from
May 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion fiona/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,14 @@ def wrapper(*args, **kwds):

if "GDAL_DATA" not in os.environ:

path = GDALDataFinder().search_wheel()

if path:
os.environ['GDAL_DATA'] = path
log.debug("GDAL data found in package, GDAL_DATA set to %r.", path)

# See https://github.com/mapbox/rasterio/issues/1631.
if GDALDataFinder().find_file("header.dxf"):
elif GDALDataFinder().find_file("header.dxf"):
log.debug("GDAL data files are available at built-in paths")

else:
Expand Down