From a57298eb1c908e4ce3f044d94393ecd302d8ca5d Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 24 Sep 2024 14:54:58 +0300 Subject: [PATCH 1/6] confu_json: add v1.1.0 --- recipes/confu_json/all/conandata.yml | 3 +++ recipes/confu_json/all/conanfile.py | 3 ++- recipes/confu_json/config.yml | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/recipes/confu_json/all/conandata.yml b/recipes/confu_json/all/conandata.yml index 5d78ae9d25a41..b14d75c5dba87 100644 --- a/recipes/confu_json/all/conandata.yml +++ b/recipes/confu_json/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.0": + url: "https://github.com/werto87/confu_json/archive/refs/tags/v1.1.0.tar.gz" + sha256: "0a993543edfb41923bd4190c14b5c7a1f1e1062c539d42eadcead66959401929" "1.0.0": url: "https://github.com/werto87/confu_json/archive/refs/tags/v1.0.0.tar.gz" sha256: "f165172220b440d37a7a8301e490cf791b3b25b0cc3f2a08b355609c5f777db0" diff --git a/recipes/confu_json/all/conanfile.py b/recipes/confu_json/all/conanfile.py index 3137417ca016a..21c226ec7f967 100644 --- a/recipes/confu_json/all/conanfile.py +++ b/recipes/confu_json/all/conanfile.py @@ -14,7 +14,7 @@ class ConfuJson(ConanFile): name = "confu_json" homepage = "https://github.com/werto87/confu_json" description = "uses boost::fusion to help with serialization; json <-> user defined type" - topics = ("json parse", "serialization", "user defined type") + topics = ("json", "serialization", "user-defined-type") license = "BSL-1.0" url = "https://github.com/conan-io/conan-center-index" package_type = "header-library" @@ -85,3 +85,4 @@ def package(self): def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] + self.cpp_info.requires = ["boost::headers", "magic_enum::magic_enum"] diff --git a/recipes/confu_json/config.yml b/recipes/confu_json/config.yml index 337baede02ad0..52b1197b54130 100644 --- a/recipes/confu_json/config.yml +++ b/recipes/confu_json/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.0": + folder: all "1.0.0": folder: all "0.0.10": From f872898bf7b9de7aca1a90e9c4bf19c8ce7a9bad Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 24 Sep 2024 15:11:47 +0300 Subject: [PATCH 2/6] confu_json: drop all existing versions --- recipes/confu_json/all/conandata.yml | 15 ++---- recipes/confu_json/all/conanfile.py | 48 +++++-------------- .../all/test_package/CMakeLists.txt | 8 +--- recipes/confu_json/config.yml | 8 +--- 4 files changed, 19 insertions(+), 60 deletions(-) diff --git a/recipes/confu_json/all/conandata.yml b/recipes/confu_json/all/conandata.yml index b14d75c5dba87..2fd438013a58c 100644 --- a/recipes/confu_json/all/conandata.yml +++ b/recipes/confu_json/all/conandata.yml @@ -2,15 +2,6 @@ sources: "1.1.0": url: "https://github.com/werto87/confu_json/archive/refs/tags/v1.1.0.tar.gz" sha256: "0a993543edfb41923bd4190c14b5c7a1f1e1062c539d42eadcead66959401929" - "1.0.0": - url: "https://github.com/werto87/confu_json/archive/refs/tags/v1.0.0.tar.gz" - sha256: "f165172220b440d37a7a8301e490cf791b3b25b0cc3f2a08b355609c5f777db0" - "0.0.10": - url: "https://github.com/werto87/confu_json/archive/refs/tags/v0.0.10.tar.gz" - sha256: "b31aab1bce952c0dc0bfc1f955a7b88be5103350b5a5eee1a4586ccec0e51fc1" - "0.0.9": - url: "https://github.com/werto87/confu_json/archive/refs/tags/v0.0.9.tar.gz" - sha256: "29b2940b939cb04f11fdab4964c86bcb23ac75c588550bf54048e024444d2718" - "0.0.5": - url: "https://github.com/werto87/confu_json/archive/refs/tags/v0.0.5.tar.gz" - sha256: "bc506d4b7836a7689b1c6a2d89bb0c3441f774c8f845fef79d85c71099df5bf9" + "1.0.1": + url: "https://github.com/werto87/confu_json/archive/refs/tags/v1.0.1.tar.gz" + sha256: "f109027dee5ca5b16829320a0e79615cd35167f4acef278204cd46932dd50af8" diff --git a/recipes/confu_json/all/conanfile.py b/recipes/confu_json/all/conanfile.py index 21c226ec7f967..9caf2e2ab1055 100644 --- a/recipes/confu_json/all/conanfile.py +++ b/recipes/confu_json/all/conanfile.py @@ -3,7 +3,6 @@ from conan.tools.build import check_min_cppstd from conan.tools.files import copy, get from conan.tools.layout import basic_layout -from conan.tools.microsoft import is_msvc from conan.tools.scm import Version import os @@ -13,58 +12,40 @@ class ConfuJson(ConanFile): name = "confu_json" homepage = "https://github.com/werto87/confu_json" - description = "uses boost::fusion to help with serialization; json <-> user defined type" + description = "Uses boost::fusion to help with serialization; json <-> user defined type" topics = ("json", "serialization", "user-defined-type") license = "BSL-1.0" url = "https://github.com/conan-io/conan-center-index" package_type = "header-library" settings = "os", "arch", "compiler", "build_type" - no_copy_source = True @property def _min_cppstd(self): - return "20" if Version(self.version) < "1.0.0" else "17" + return "20" @property def _compilers_minimum_version(self): return { - "17": { - "Visual Studio": "17", - "msvc": "193", - "gcc": "7", - "clang": "7", - }, - "20": { - "Visual Studio": "17", - "msvc": "193", - "gcc": "10", - "clang": "10", - }, - }.get(self._min_cppstd, {}) + "Visual Studio": "17", + "msvc": "193", + "gcc": "10", + "clang": "10", + "apple-clang": "13", + } def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.81.0") - self.requires("magic_enum/0.8.2") + self.requires("boost/1.86.0") + self.requires("magic_enum/0.9.6") def package_id(self): self.info.clear() def validate(self): - if self.settings.compiler == "apple-clang": - raise ConanInvalidConfiguration("apple-clang is not supported. Pull request welcome") - - if self.settings.compiler == "gcc" and Version(self.version) < "1.0.0": - raise ConanInvalidConfiguration("gcc is only supported in versions greater than or equal 1.0.0.") - - if is_msvc(self) and Version(self.version) < "0.0.9": - raise ConanInvalidConfiguration("Visual Studio is not supported in versions before confu_json/0.0.9") - if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version and Version(self.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration( @@ -74,13 +55,10 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - pass - def package(self): - copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) - copy(self, "*.h*", src=os.path.join(self.source_folder, "confu_json"), - dst=os.path.join(self.package_folder, "include", "confu_json")) + copy(self, "LICENSE.md", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "*.h*", os.path.join(self.source_folder, "confu_json"), + os.path.join(self.package_folder, "include", "confu_json")) def package_info(self): self.cpp_info.bindirs = [] diff --git a/recipes/confu_json/all/test_package/CMakeLists.txt b/recipes/confu_json/all/test_package/CMakeLists.txt index cbb13e9d5f0af..eb6d533e601eb 100644 --- a/recipes/confu_json/all/test_package/CMakeLists.txt +++ b/recipes/confu_json/all/test_package/CMakeLists.txt @@ -1,12 +1,8 @@ -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) find_package(confu_json REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE confu_json::confu_json) -if(confu_json_VERSION VERSION_LESS "1.0.0") - target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) -else() - target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) -endif() +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/confu_json/config.yml b/recipes/confu_json/config.yml index 52b1197b54130..20ec1c9e2bdee 100644 --- a/recipes/confu_json/config.yml +++ b/recipes/confu_json/config.yml @@ -1,11 +1,5 @@ versions: "1.1.0": folder: all - "1.0.0": - folder: all - "0.0.10": - folder: all - "0.0.9": - folder: all - "0.0.5": + "1.0.1": folder: all From 845a1e19a32baa9bcbe86e1aaaacf53893b62144 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 24 Sep 2024 16:01:43 +0300 Subject: [PATCH 3/6] confu_json: use boost/1.85.0 --- recipes/confu_json/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/confu_json/all/conanfile.py b/recipes/confu_json/all/conanfile.py index 9caf2e2ab1055..bfd685f13b900 100644 --- a/recipes/confu_json/all/conanfile.py +++ b/recipes/confu_json/all/conanfile.py @@ -37,7 +37,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.86.0") + self.requires("boost/1.85.0") self.requires("magic_enum/0.9.6") def package_id(self): From 748cb9bcc60dc91067756928ca011798b1a691ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abril=20Rinc=C3=B3n=20Blanco?= Date: Wed, 25 Sep 2024 13:39:31 +0200 Subject: [PATCH 4/6] Update recipes/confu_json/all/conanfile.py --- recipes/confu_json/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/confu_json/all/conanfile.py b/recipes/confu_json/all/conanfile.py index bfd685f13b900..49f2a31eb6d28 100644 --- a/recipes/confu_json/all/conanfile.py +++ b/recipes/confu_json/all/conanfile.py @@ -13,7 +13,7 @@ class ConfuJson(ConanFile): name = "confu_json" homepage = "https://github.com/werto87/confu_json" description = "Uses boost::fusion to help with serialization; json <-> user defined type" - topics = ("json", "serialization", "user-defined-type") + topics = ("json", "serialization", "user-defined-type", "header-only") license = "BSL-1.0" url = "https://github.com/conan-io/conan-center-index" package_type = "header-library" From 65ec198050e83008f29acaa77902ae1db6266fa4 Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Tue, 31 Dec 2024 15:06:08 +0000 Subject: [PATCH 5/6] confu_json 1.1.1 --- recipes/confu_json/all/conandata.yml | 9 +++----- recipes/confu_json/all/conanfile.py | 23 ++----------------- .../all/test_v1_package/CMakeLists.txt | 8 ------- .../all/test_v1_package/conanfile.py | 17 -------------- recipes/confu_json/config.yml | 4 +--- 5 files changed, 6 insertions(+), 55 deletions(-) delete mode 100644 recipes/confu_json/all/test_v1_package/CMakeLists.txt delete mode 100644 recipes/confu_json/all/test_v1_package/conanfile.py diff --git a/recipes/confu_json/all/conandata.yml b/recipes/confu_json/all/conandata.yml index 2fd438013a58c..96bebd1cc3eab 100644 --- a/recipes/confu_json/all/conandata.yml +++ b/recipes/confu_json/all/conandata.yml @@ -1,7 +1,4 @@ sources: - "1.1.0": - url: "https://github.com/werto87/confu_json/archive/refs/tags/v1.1.0.tar.gz" - sha256: "0a993543edfb41923bd4190c14b5c7a1f1e1062c539d42eadcead66959401929" - "1.0.1": - url: "https://github.com/werto87/confu_json/archive/refs/tags/v1.0.1.tar.gz" - sha256: "f109027dee5ca5b16829320a0e79615cd35167f4acef278204cd46932dd50af8" + "1.1.1": + url: "https://github.com/werto87/confu_json/archive/refs/tags/v1.1.1.tar.gz" + sha256: "6b302c7c4b926db8ff0de65254eb0422eab04385a389715b88297bebf5378c35" diff --git a/recipes/confu_json/all/conanfile.py b/recipes/confu_json/all/conanfile.py index 49f2a31eb6d28..5d044c0028672 100644 --- a/recipes/confu_json/all/conanfile.py +++ b/recipes/confu_json/all/conanfile.py @@ -6,7 +6,7 @@ from conan.tools.scm import Version import os -required_conan_version = ">=1.51.1" +required_conan_version = ">=2.0" class ConfuJson(ConanFile): @@ -19,19 +19,6 @@ class ConfuJson(ConanFile): package_type = "header-library" settings = "os", "arch", "compiler", "build_type" - @property - def _min_cppstd(self): - return "20" - - @property - def _compilers_minimum_version(self): - return { - "Visual Studio": "17", - "msvc": "193", - "gcc": "10", - "clang": "10", - "apple-clang": "13", - } def layout(self): basic_layout(self, src_folder="src") @@ -44,13 +31,7 @@ def package_id(self): self.info.clear() def validate(self): - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, self._min_cppstd) - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version and Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration( - f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." - ) + check_min_cppstd(self, 20) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/confu_json/all/test_v1_package/CMakeLists.txt b/recipes/confu_json/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 0d20897301b68..0000000000000 --- a/recipes/confu_json/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package - ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/confu_json/all/test_v1_package/conanfile.py b/recipes/confu_json/all/test_v1_package/conanfile.py deleted file mode 100644 index 38f4483872d47..0000000000000 --- a/recipes/confu_json/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/confu_json/config.yml b/recipes/confu_json/config.yml index 20ec1c9e2bdee..60d31991f5141 100644 --- a/recipes/confu_json/config.yml +++ b/recipes/confu_json/config.yml @@ -1,5 +1,3 @@ versions: - "1.1.0": - folder: all - "1.0.1": + "1.1.1": folder: all From a30744dea81462355dd4e7331e4a9cd40d1d9c8a Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Tue, 31 Dec 2024 15:12:18 +0000 Subject: [PATCH 6/6] unused import --- recipes/confu_json/all/conanfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/confu_json/all/conanfile.py b/recipes/confu_json/all/conanfile.py index 5d044c0028672..496405f1bc15d 100644 --- a/recipes/confu_json/all/conanfile.py +++ b/recipes/confu_json/all/conanfile.py @@ -3,7 +3,6 @@ from conan.tools.build import check_min_cppstd from conan.tools.files import copy, get from conan.tools.layout import basic_layout -from conan.tools.scm import Version import os required_conan_version = ">=2.0"