From 2bc75c30e593013092283232a52afe4c84312253 Mon Sep 17 00:00:00 2001 From: Martin Raspaud Date: Thu, 18 Jan 2024 11:43:29 +0100 Subject: [PATCH 1/4] Update version for support of newer pythons Signed-off-by: Martin Raspaud --- conda/build.sh | 2 +- conda/conda_build_config.yaml | 6 +++--- conda/meta.yaml | 14 +++++--------- src/fcidecomp-python/setup.py | 9 +++++---- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/conda/build.sh b/conda/build.sh index d2da176..c65d425 100644 --- a/conda/build.sh +++ b/conda/build.sh @@ -49,7 +49,7 @@ cp -r ${PATH_TO_DELIVERY}/fcidecomp/* ${FCIDECOMP_BUILD_PATH} # ./gen/build.sh fcicomp-H5Zjpegls test ./gen/install.sh fcicomp-H5Zjpegls -pip install --no-deps --ignore-installed -vv ../fcidecomp-python +pip install --no-deps --ignore-installed --use-pep517 -vv ../fcidecomp-python mkdir -p "${PREFIX}/etc/conda/activate.d" cp "${RECIPE_DIR}/scripts/activate.sh" "${PREFIX}/etc/conda/activate.d/${PKG_NAME}_activate.sh" diff --git a/conda/conda_build_config.yaml b/conda/conda_build_config.yaml index aefb9de..610ebee 100644 --- a/conda/conda_build_config.yaml +++ b/conda/conda_build_config.yaml @@ -1,4 +1,4 @@ python: - - 3.7 - - 3.8 - - 3.9 \ No newline at end of file + - 3.10 + - 3.11 + - 3.12 diff --git a/conda/meta.yaml b/conda/meta.yaml index c48d954..325aed6 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -3,7 +3,7 @@ # - https://github.com/mraspaud/fcidecomp-conda-recipe/blob/master/build.sh {% set setup_data = load_setup_py_data(setup_file='../src/fcidecomp-python/setup.py', from_recipe_dir=True) %} -{% set charls_version = "2.1.0" %} +{% set charls_version = "2.4.2" %} package: name: fcidecomp @@ -25,17 +25,13 @@ requirements: - make # [not win] - ninja # [win] host: - - charls=2.1.0 # [not win32] - - hdf5=1.10.* - - h5py=2.* # [not win] - - h5py=3.6.0 # [win] + - charls>=2.1.0 # [not win32] + - h5py>=3.6.0 # [win] - python {{ python }} - zlib run: - - charls=2.1.0 # [not win32] - - hdf5=1.10.* - - h5py=2.* # [not win] - - h5py=3.6.0 # [win] + - charls>=2.1.0 # [not win32] + - h5py>=3.6.0 # [win] - libnetcdf!=4.8.0 # [win] - libssh2 # [win] - netcdf4 diff --git a/src/fcidecomp-python/setup.py b/src/fcidecomp-python/setup.py index 900cb48..6a49ffb 100644 --- a/src/fcidecomp-python/setup.py +++ b/src/fcidecomp-python/setup.py @@ -40,7 +40,8 @@ setup( name='fcidecomp-python', - version=version, + version="2.0.1", + #version=version, description="FCIDECOMP Python plugin", long_description=readme, author="B-Open Solutions srl", @@ -59,8 +60,8 @@ "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ], ) From f9c968bd3eddda02083e3cfa5abdb1b539fb39eb Mon Sep 17 00:00:00 2001 From: Martin Raspaud Date: Wed, 31 Jan 2024 12:01:20 +0100 Subject: [PATCH 2/4] Add instruction to build the conda package --- INSTALL.md | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 27bce7d..2e144ed 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -32,7 +32,7 @@ Start by creating a new `conda` environment. Let's call it `fcidecomp`, but any valid name would do (change the following instructions accordingly): conda create -n fcidecomp python=$PYTHON_VERSION - + where Python versions currently supported by ``fcidecomp`` are 3.7 <= `$PYTHON_VERSION` <= 3.9. Activate the environment: @@ -49,12 +49,33 @@ Once the installation has completed, re-activate the `conda` environment running conda deactivate conda activate fcidecomp - + This last step ensures the `HDF5_PLUGIN_PATH` environment variable is correctly set to the directory containing the FCIDECOMP decompression libraries. -## Build and installation from the source code +## Build and local installation of the conda package + +This allows to skip the next section + +### Prerequisites + +Make sure you have a conda environment to work in. Also, `boa` needs to be installed. + +### Building + +To start the build from the `fcidecomp` directory: + + conda mambabuild . --python 3.11 + +### Installing + +To install from the locally build conda package: + + mamba install fcidecomp -c local + + +## Build and installation of the librabies from the source code ### Install pre-requisite packages @@ -81,20 +102,20 @@ the ``epel-release`` repository is needed as well, so execute the following: First, install the software required to build the binaries (common for ``CharLS`` and ``fcidecomp``): - sudo apt install -y git - sudo apt-get install -y cmake gcc=4:9.3.0-1ubuntu2 g++ + sudo apt install -y git + sudo apt-get install -y cmake gcc=4:9.3.0-1ubuntu2 g++ Then, let's install some ``fcidecomp``-specific dependency packages: sudo apt install -y zlib1g-dev libhdf5-dev - + ### Build CharLS Next step is to build and install CharLS. `fcidecomp` has been tested with CharLS version ``2.1.0``, so let's use this one: - git clone -b 2.1.0 https://github.com/team-charls/charls.git && cd charls + git clone -b 2.1.0 https://github.com/team-charls/charls.git && cd charls mkdir release && cd release cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=On .. make && sudo make install @@ -105,7 +126,7 @@ Now we can build ``fcidecomp`` proper. Go to one folder up. -Obtain the source code either from the Open Source EUMETSAT repository (set ``FCIDECOMP_TAG`` to the proper +Obtain the source code either from the Open Source EUMETSAT repository (set ``FCIDECOMP_TAG`` to the proper ``fcidecomp`` tag, e.g. `2.0.1`): git clone -b $FCIDECOMP_TAG https://gitlab.eumetsat.int/open-source/fcidecomp/ @@ -130,4 +151,3 @@ Finally, set the environment variable ``HDF5_PLUGIN_PATH`` to the install path o specified above (following the instructions above, it is ``/usr/local/fcidecomp/hdf5/lib/plugin/`` (for Ubuntu20.04)): export HDF5_PLUGIN_PATH=/usr/local/fcidecomp/hdf5/lib/plugin/ - From 064e8fd063e77460b5320eb1a8f1b47ec76626f6 Mon Sep 17 00:00:00 2001 From: Martin Raspaud Date: Wed, 31 Jan 2024 13:22:41 +0100 Subject: [PATCH 3/4] Correct typo --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 2e144ed..0d90c0a 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -75,7 +75,7 @@ To install from the locally build conda package: mamba install fcidecomp -c local -## Build and installation of the librabies from the source code +## Build and installation of the libraries from the source code ### Install pre-requisite packages From 96896ea3616b91cc00d78beddfd62430f8b13201 Mon Sep 17 00:00:00 2001 From: Martin Raspaud Date: Wed, 31 Jan 2024 13:26:05 +0100 Subject: [PATCH 4/4] Do not specify python version in build instructions --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 0d90c0a..2759088 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -66,7 +66,7 @@ Make sure you have a conda environment to work in. Also, `boa` needs to be insta To start the build from the `fcidecomp` directory: - conda mambabuild . --python 3.11 + conda mambabuild . ### Installing