Skip to content

Commit

Permalink
maybe fix windows cffi issue with '\r'
Browse files Browse the repository at this point in the history
  • Loading branch information
alexamici committed Nov 16, 2020
1 parent 9828848 commit 8f4fb00
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cfgrib/bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@

LOG = logging.getLogger(__name__)

CDEF = pkgutil.get_data(__name__, "grib_api.h") + pkgutil.get_data(__name__, "eccodes.h")

ffi = cffi.FFI()
ffi.cdef(
pkgutil.get_data(__name__, "grib_api.h").decode("utf-8")
+ pkgutil.get_data(__name__, "eccodes.h").decode("utf-8")
)
ffi.cdef(CDEF.decode("utf-8").replace("\r", "\n"))


LIBNAMES = ["eccodes", "libeccodes.so", "libeccodes"]
Expand Down

0 comments on commit 8f4fb00

Please sign in to comment.