From fec3374bd741ab9077ce72717965ebb9443cd837 Mon Sep 17 00:00:00 2001 From: Till Ehrengruber Date: Tue, 22 Oct 2024 14:00:58 +0200 Subject: [PATCH 01/10] Bump atlas to 0.39.0 --- setup.py | 6 +++--- src/atlas4py/_version.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 419494b..4d93e0a 100644 --- a/setup.py +++ b/setup.py @@ -11,9 +11,9 @@ VERSIONS = dict( cmake="3.14.0", - ecbuild="3.8.0", - eckit="1.24.0", - atlas="0.35.1", + ecbuild="3.8.5", + eckit="1.28.0", + atlas="0.39.0", pybind11="2.11.1", python="3.6", ) diff --git a/src/atlas4py/_version.py b/src/atlas4py/_version.py index 323bf24..ada0db2 100644 --- a/src/atlas4py/_version.py +++ b/src/atlas4py/_version.py @@ -1 +1 @@ -__version__ = "0.35.1.dev15" +__version__ = "0.39.ß" From c3fedd9dfedd663d0c633076f98790a427faedbc Mon Sep 17 00:00:00 2001 From: Till Ehrengruber Date: Fri, 25 Oct 2024 12:23:53 +0200 Subject: [PATCH 02/10] Fix ECKIT_CODEC --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.py b/setup.py index 4d93e0a..8e1b83e 100644 --- a/setup.py +++ b/setup.py @@ -113,6 +113,9 @@ def build_extension(self, ext): "-DATLAS4PY_ECKIT_VERSION=" + VERSIONS["eckit"], "-DATLAS4PY_ATLAS_VERSION=" + VERSIONS["atlas"], "-DATLAS4PY_PYBIND11_VERSION=" + VERSIONS["pybind11"], + # TODO(tehrengruber): Re-enable. Using ECKIT_CODEC currently fails with: + # `ImportError: libeckit_codec.so: cannot open shared object file: No such file or directory` + "-DENABLE_ECKIT_CODEC=Off", # disable since broken right now ] if sys.platform.startswith("darwin"): # Cross-compile support for macOS - respect ARCHFLAGS if set @@ -121,6 +124,7 @@ def build_extension(self, ext): if archs_values: cmake_args.append("-DCMAKE_OSX_ARCHITECTURES=" + archs_values) # print(f"./{self.build_temp}$ " + " ".join(["cmake", ext.sourcedir] + cmake_args)) + print(" ".join(["cmake", ext.sourcedir] + cmake_args)) subprocess.check_call(["cmake", ext.sourcedir] + cmake_args, cwd=self.build_temp) # Run CMake build From d55a34480cd75db2a287c0bc909b4a1b5f4be0c7 Mon Sep 17 00:00:00 2001 From: Till Ehrengruber Date: Fri, 25 Oct 2024 12:24:53 +0200 Subject: [PATCH 03/10] Fix ECKIT_CODEC --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8e1b83e..802971a 100644 --- a/setup.py +++ b/setup.py @@ -115,7 +115,7 @@ def build_extension(self, ext): "-DATLAS4PY_PYBIND11_VERSION=" + VERSIONS["pybind11"], # TODO(tehrengruber): Re-enable. Using ECKIT_CODEC currently fails with: # `ImportError: libeckit_codec.so: cannot open shared object file: No such file or directory` - "-DENABLE_ECKIT_CODEC=Off", # disable since broken right now + "-DENABLE_ECKIT_CODEC=Off", ] if sys.platform.startswith("darwin"): # Cross-compile support for macOS - respect ARCHFLAGS if set From f3424de127a35eac05561ec829d5614509757d1f Mon Sep 17 00:00:00 2001 From: Till Ehrengruber Date: Fri, 25 Oct 2024 12:25:08 +0200 Subject: [PATCH 04/10] Fix ECKIT_CODEC --- src/atlas4py/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/atlas4py/_version.py b/src/atlas4py/_version.py index ada0db2..e72781a 100644 --- a/src/atlas4py/_version.py +++ b/src/atlas4py/_version.py @@ -1 +1 @@ -__version__ = "0.39.ß" +__version__ = "0.39.0" From 49dcd09bf419d81e8f3701fa86d06912f89a0c74 Mon Sep 17 00:00:00 2001 From: Till Ehrengruber Date: Fri, 25 Oct 2024 12:28:52 +0200 Subject: [PATCH 05/10] Fix ECKIT_CODEC --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 802971a..8327fc4 100644 --- a/setup.py +++ b/setup.py @@ -124,7 +124,6 @@ def build_extension(self, ext): if archs_values: cmake_args.append("-DCMAKE_OSX_ARCHITECTURES=" + archs_values) # print(f"./{self.build_temp}$ " + " ".join(["cmake", ext.sourcedir] + cmake_args)) - print(" ".join(["cmake", ext.sourcedir] + cmake_args)) subprocess.check_call(["cmake", ext.sourcedir] + cmake_args, cwd=self.build_temp) # Run CMake build From b67c67e25142e12cf3df0b6ea9d8868b5663f50d Mon Sep 17 00:00:00 2001 From: Till Ehrengruber Date: Fri, 25 Oct 2024 15:37:59 +0200 Subject: [PATCH 06/10] Simplify --- setup.py | 5 +---- src/atlas4py/CMakeLists.txt | 28 ++++++++++++++++------------ 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/setup.py b/setup.py index 8327fc4..e4a971a 100644 --- a/setup.py +++ b/setup.py @@ -112,10 +112,7 @@ def build_extension(self, ext): "-DATLAS4PY_ECBUILD_VERSION=" + VERSIONS["ecbuild"], "-DATLAS4PY_ECKIT_VERSION=" + VERSIONS["eckit"], "-DATLAS4PY_ATLAS_VERSION=" + VERSIONS["atlas"], - "-DATLAS4PY_PYBIND11_VERSION=" + VERSIONS["pybind11"], - # TODO(tehrengruber): Re-enable. Using ECKIT_CODEC currently fails with: - # `ImportError: libeckit_codec.so: cannot open shared object file: No such file or directory` - "-DENABLE_ECKIT_CODEC=Off", + "-DATLAS4PY_PYBIND11_VERSION=" + VERSIONS["pybind11"] ] if sys.platform.startswith("darwin"): # Cross-compile support for macOS - respect ARCHFLAGS if set diff --git a/src/atlas4py/CMakeLists.txt b/src/atlas4py/CMakeLists.txt index c13297f..478b1eb 100644 --- a/src/atlas4py/CMakeLists.txt +++ b/src/atlas4py/CMakeLists.txt @@ -8,10 +8,12 @@ set(CMAKE_CXX_STANDARD 17) include(FetchContent) function(copy_target ct_tgt) - add_custom_target(copy_${ct_tgt} ALL - COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} - DEPENDS ${ct_tgt} - ) + if(NOT TARGET copy_${ct_tgt}) + add_custom_target(copy_${ct_tgt} ALL + COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} + DEPENDS ${ct_tgt} + ) + endif() endfunction() find_package(atlas QUIET PATHS $ENV{ATLAS_INSTALL_DIR}) @@ -57,14 +59,16 @@ if(NOT atlas_FOUND) if(_atlas4py_built_eckit) # copy atlas' eckit dependencies - get_target_property(deps atlas LINK_LIBRARIES) - get_target_property(deps_interface atlas INTERFACE_LINK_LIBRARIES) - list(APPEND deps ${deps_interface}) - list(REMOVE_DUPLICATES deps) - foreach(dep IN LISTS deps) - if(dep MATCHES "eckit.*") - copy_target(${dep}) - endif() + foreach(lib "atlas" "atlas_io") + get_target_property(deps ${lib} LINK_LIBRARIES) + get_target_property(deps_interface ${lib} INTERFACE_LINK_LIBRARIES) + list(APPEND deps ${deps_interface}) + list(REMOVE_DUPLICATES deps) + foreach(dep IN LISTS deps) + if(dep MATCHES "eckit.*") + copy_target(${dep}) + endif() + endforeach() endforeach() endif() endif() From be51fb61852351abc8beab5a588eba979bf3c083 Mon Sep 17 00:00:00 2001 From: Till Ehrengruber Date: Fri, 25 Oct 2024 15:42:23 +0200 Subject: [PATCH 07/10] Version var --- src/atlas4py/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/atlas4py/_version.py b/src/atlas4py/_version.py index e72781a..87b6f17 100644 --- a/src/atlas4py/_version.py +++ b/src/atlas4py/_version.py @@ -1 +1 @@ -__version__ = "0.39.0" +__version__ = "0.39.0.dev1" From 6a7e95231a6283e93c16577ec5aac1430e49c43c Mon Sep 17 00:00:00 2001 From: Till Ehrengruber Date: Fri, 25 Oct 2024 15:43:11 +0200 Subject: [PATCH 08/10] Version var --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e4a971a..4d93e0a 100644 --- a/setup.py +++ b/setup.py @@ -112,7 +112,7 @@ def build_extension(self, ext): "-DATLAS4PY_ECBUILD_VERSION=" + VERSIONS["ecbuild"], "-DATLAS4PY_ECKIT_VERSION=" + VERSIONS["eckit"], "-DATLAS4PY_ATLAS_VERSION=" + VERSIONS["atlas"], - "-DATLAS4PY_PYBIND11_VERSION=" + VERSIONS["pybind11"] + "-DATLAS4PY_PYBIND11_VERSION=" + VERSIONS["pybind11"], ] if sys.platform.startswith("darwin"): # Cross-compile support for macOS - respect ARCHFLAGS if set From aebcef7e11d41faf54be3bb8cdd699394e8b50a1 Mon Sep 17 00:00:00 2001 From: Till Ehrengruber Date: Sat, 26 Oct 2024 11:26:06 +0200 Subject: [PATCH 09/10] Version var --- src/atlas4py/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/atlas4py/_version.py b/src/atlas4py/_version.py index 87b6f17..6541dab 100644 --- a/src/atlas4py/_version.py +++ b/src/atlas4py/_version.py @@ -1 +1 @@ -__version__ = "0.39.0.dev1" +__version__ = "0.39.0.dev16" \ No newline at end of file From 0ed7c405a229605ef530fe84aba5c176444d6f92 Mon Sep 17 00:00:00 2001 From: Till Ehrengruber Date: Wed, 13 Nov 2024 23:06:41 +0100 Subject: [PATCH 10/10] Fix version check --- check_version.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/check_version.py b/check_version.py index f786c4c..2810c49 100755 --- a/check_version.py +++ b/check_version.py @@ -2,7 +2,7 @@ import re import requests - +import functools try: pypi_version = requests.get("https://test.pypi.org/pypi/atlas4py/json").json()["info"][ @@ -19,7 +19,10 @@ local_parts = [int(num_re.match(p)[1]) for p in local_version.split(".")] pypi_parts = [int(num_re.match(p)[1]) for p in pypi_version.split(".")] -if local_parts == pypi_parts or not all(l >= p for l, p in zip(local_parts, pypi_parts)): +for l, p in zip(local_parts, pypi_parts): + if l > p: + break +else: raise ValueError( f"Local version '{local_version}'' is not newer than the currently published version '{pypi_version}'" )