Fix conan package version

This commit is contained in:
2025-06-28 19:54:03 +02:00
parent 293135c9af
commit a43901095c
2 changed files with 3 additions and 12 deletions

View File

@@ -4,6 +4,7 @@
"conan": {}
},
"include": [
"build_Debug/build/Debug/generators/CMakePresets.json"
"build_Debug/build/Debug/generators/CMakePresets.json",
"build/Release/generators/CMakePresets.json"
]
}

View File

@@ -6,7 +6,7 @@ from conan.tools.cmake import cmake_layout
class FoldingConan(ConanFile):
name = "folding"
version = "X.X.X"
version = "1.1.1"
description = "K-Fold and stratified K-Fold header-only library"
url = "https://github.com/rmontanana/folding"
license = "MIT"
@@ -30,16 +30,6 @@ class FoldingConan(ConanFile):
def layout(self):
cmake_layout(self)
def init(self):
# Read the CMakeLists.txt file to get the version
with open("folding.hpp", "r") as f:
content = f.read()
match = re.search(
r'const std::string FOLDING_VERSION = "([^"]+)";', content
)
if match:
self.version = match.group(1)
def package(self):
copy(self, "*.hpp", src=self.source_folder, dst=self.package_folder)