From b7ee31f219e8b3515794ebce53b70f8cb61e1a7f Mon Sep 17 00:00:00 2001
From: MADELA Patrick <patrick.madela@synchrotron-soleil.fr>
Date: Thu, 22 Aug 2024 18:55:18 +0200
Subject: [PATCH] Use new approach based on python requires and fix versions
 differences (conan, maven, tags)

---
 conanfile.py | 27 +++------------------------
 1 file changed, 3 insertions(+), 24 deletions(-)

diff --git a/conanfile.py b/conanfile.py
index 3742299..8b0f7d8 100644
--- a/conanfile.py
+++ b/conanfile.py
@@ -1,6 +1,4 @@
 from conan import ConanFile
-from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps
-
 
 class MythenWAXSRecipe(ConanFile):
     name = "mythenwaxs"
@@ -8,8 +6,10 @@ class MythenWAXSRecipe(ConanFile):
     version = "1.0.2"
     package_type = "application"
     user = "soleil"
+    python_requires = "base/[>=1.0]@soleil/stable"
+    python_requires_extend = "base.Device"
 
-    license = "GPL-3.0-or-later"
+    license = "GPL-3.0-or-later"    
     author = "Arafat Nourredine, Alain Buteau"
     url = "https://gitlab.synchrotron-soleil.fr/software-control-system/tango-devices/acquisition/1d/mythenwaxs.git"
     description = "MythenWAXS device"
@@ -23,24 +23,3 @@ class MythenWAXSRecipe(ConanFile):
         self.requires("yat4tango/[>=1.0]@soleil/stable")
         if self.settings.os == "Linux":
             self.requires("crashreporting2/[>=1.0]@soleil/stable")
-    
-    def layout(self):
-        cmake_layout(self)
-
-    def generate(self):
-        deps = CMakeDeps(self)
-        deps.generate()
-        tc = CMakeToolchain(self)
-        tc.variables["PROJECT_NAME"] = self.name
-        tc.variables["PROJECT_VERSION"] = self.version
-        tc.variables["EXECUTABLE_NAME"] = self.executable
-        tc.generate()
-
-    def build(self):
-        cmake = CMake(self)
-        cmake.configure()
-        cmake.build()
-
-    def package(self):
-        cmake = CMake(self)
-        cmake.install()
-- 
GitLab