Skip to content

Commit

Permalink
(#25218) docs: use version range for meson & pkgconf in package templ…
Browse files Browse the repository at this point in the history
…ates
  • Loading branch information
SpaceIm authored Sep 12, 2024
1 parent b344641 commit b70904f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/package_templates/autotools_package/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def build_requirements(self):
self.tool_requires("libtool/x.y.z")
# only if upstream configure.ac relies on PKG_CHECK_MODULES macro
if not self.conf.get("tools.gnu:pkg_config", check_type=str):
self.tool_requires("pkgconf/x.y.z")
self.tool_requires("pkgconf/[>=1.2.3 <2]")
# required to suppport windows as a build machine
if self._settings_build.os == "Windows":
self.win_bash = True
Expand Down
4 changes: 2 additions & 2 deletions docs/package_templates/meson_package/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ def validate(self):
# if another tool than the compiler or Meson is required to build the project (pkgconf, bison, flex etc)
def build_requirements(self):
# CCI policy assumes that Meson may not be installed on consumers machine
self.tool_requires("meson/1.2.3")
self.tool_requires("meson/[>=1.2.3 <2]")
# pkgconf is largely used by Meson, it should be added in build requirement when there are dependencies
if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str):
self.tool_requires("pkgconf/2.0.3")
self.tool_requires("pkgconf/[>=2.2 <3]")

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def requirements(self):
self.requires(self.tested_reference_str)

def build_requirements(self):
self.tool_requires("meson/1.2.3")
self.tool_requires("meson/[>=1.2.3 <2]")
if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str):
self.tool_requires("pkgconf/2.0.3")
self.tool_requires("pkgconf/[>=2.2 <3]")

def build(self):
meson = Meson(self)
Expand Down

0 comments on commit b70904f

Please sign in to comment.