This is an optional compilation step in addition to Installation of the Python3 bindings which makes the code as fast as the original ecCodes module.
Step-by-step guide
To test the much faster CFFI API level, out-of-line mode you need the ecCodes header files. Then you need to clone the repo in the same folder as your ecCodes source tree, make a pip development install and custom compile the binary bindings following these steps:
Code Block |
---|
|
$# Clone the repository to the same folder of your ecCodes source tree:
% git clone https://github.com/ecmwf/eccodes-python
$% cd eccodes-python
$
# Make a pip development install:
% pip install -e .
$
# Copy ecCodes header files from ecCodes installation to Python3 include directory:
% cp {ECCODES_DIR}/include/*.h {ECCODESPYTHON3_DIR}/include/python3.x/
$ python builder.pyX/
# Compile the binary bindings:
% python3 builder.py |
Related articles
Content by Label |
---|
showLabels | false |
---|
max | 5 |
---|
spaces | UDOC |
---|
showSpace | false |
---|
sort | modified |
---|
reverse | true |
---|
type | page |
---|
excludeCurrent | true |
---|
cql | label in ("pip","python","python3") and label in ("python3","python","installation","pip") and type = "page" and space = "UDOC" |
---|
labels | pip python python3 |
---|
|