diff options
author | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2020-12-20 04:04:12 +0800 |
---|---|---|
committer | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2020-12-20 04:04:12 +0800 |
commit | c9d2fcf70de22a5d71595c9915025022968549a8 (patch) | |
tree | e0f8ba2bfb4febb5735c909e7e5197e2dfed3bdd /science | |
parent | a4e11a3a6b39dd9831a1af8bef72156dee101b38 (diff) | |
download | freebsd-ports-gnome-c9d2fcf70de22a5d71595c9915025022968549a8.tar.gz freebsd-ports-gnome-c9d2fcf70de22a5d71595c9915025022968549a8.tar.zst freebsd-ports-gnome-c9d2fcf70de22a5d71595c9915025022968549a8.zip |
Add py-eccodes 1.0.0 (copied from py-eccodes-python)
Changes: https://github.com/ecmwf/eccodes-python/blob/develop/CHANGELOG.rst
Diffstat (limited to 'science')
-rw-r--r-- | science/Makefile | 1 | ||||
-rw-r--r-- | science/py-eccodes/Makefile | 24 | ||||
-rw-r--r-- | science/py-eccodes/distinfo | 3 | ||||
-rw-r--r-- | science/py-eccodes/files/patch-gribapi-bindings.py | 19 | ||||
-rw-r--r-- | science/py-eccodes/pkg-descr | 15 |
5 files changed, 62 insertions, 0 deletions
diff --git a/science/Makefile b/science/Makefile index 5c91ef73d3f4..a1953927a733 100644 --- a/science/Makefile +++ b/science/Makefile @@ -231,6 +231,7 @@ SUBDIR += py-chempy SUBDIR += py-coards SUBDIR += py-dlib + SUBDIR += py-eccodes SUBDIR += py-eccodes-python SUBDIR += py-geolinks SUBDIR += py-geomet diff --git a/science/py-eccodes/Makefile b/science/py-eccodes/Makefile new file mode 100644 index 000000000000..e3af80b1fe79 --- /dev/null +++ b/science/py-eccodes/Makefile @@ -0,0 +1,24 @@ +# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= eccodes +PORTVERSION= 1.0.0 +CATEGORIES= science python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Python interface to the ecCodes BUFR and GRIB de/encoder + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libeccodes.so:science/eccodes +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}attrs>=0:devel/py-attrs@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}cffi>=0:devel/py-cffi@${PY_FLAVOR} \ + ${PYNUMPY} + +USES= python:3.5+ +USE_PYTHON= autoplist concurrent distutils + +.include <bsd.port.mk> diff --git a/science/py-eccodes/distinfo b/science/py-eccodes/distinfo new file mode 100644 index 000000000000..14ff30431b68 --- /dev/null +++ b/science/py-eccodes/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1608366074 +SHA256 (eccodes-1.0.0.tar.gz) = 8df323e022042ce04f7bc07d0818a5d099a706e80b712fecbef7fc4b33a2fa99 +SIZE (eccodes-1.0.0.tar.gz) = 58713 diff --git a/science/py-eccodes/files/patch-gribapi-bindings.py b/science/py-eccodes/files/patch-gribapi-bindings.py new file mode 100644 index 000000000000..346e4bbd4cc0 --- /dev/null +++ b/science/py-eccodes/files/patch-gribapi-bindings.py @@ -0,0 +1,19 @@ +--- gribapi/bindings.py.orig 2020-10-15 15:56:17 UTC ++++ gribapi/bindings.py +@@ -34,7 +34,7 @@ except ModuleNotFoundError: + + pkgutil.get_data(__name__, "eccodes.h").decode("utf-8") + ) + +- LIBNAMES = ["eccodes", "libeccodes.so", "libeccodes"] ++ LIBNAMES = ["libeccodes.so"] + + try: + import ecmwflibs +@@ -46,7 +46,6 @@ except ModuleNotFoundError: + if os.environ.get("ECCODES_DIR"): + eccdir = os.environ["ECCODES_DIR"] + LIBNAMES.insert(0, os.path.join(eccdir, "lib/libeccodes.so")) +- LIBNAMES.insert(0, os.path.join(eccdir, "lib64/libeccodes.so")) + + for libname in LIBNAMES: + try: diff --git a/science/py-eccodes/pkg-descr b/science/py-eccodes/pkg-descr new file mode 100644 index 000000000000..533369539ff1 --- /dev/null +++ b/science/py-eccodes/pkg-descr @@ -0,0 +1,15 @@ +Python 3 interface to encode and decode GRIB and BUFR files via the ECMWF +ecCodes library. + +Features: +- reads and writes GRIB 1 and 2 files, +- reads and writes BUFR 3 and 4 files, +- supports all modern versions of Python 3.7, 3.6, 3.5 and PyPy3, +- works on most Linux distributions and MacOS, the ecCodes C-library is the only + system dependency, +- PyPI package with no install time build (binds with CFFI ABI level, in-line + mode), +- supports writing the index of a GRIB file to disk, to save a full-file scan on + open. + +WWW: https://github.com/ecmwf/eccodes-python |