You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to make conditional aliases. I would like to use them to model system versions, and require them like:
from conans import ConanFile
class ConsumerConanfile(ConanFile):
requires = "protobuf/(system)@"
With the current definition, I cannot make aliases depend on settings.
It would be cool to have a set_alias() function (similar to set_name(), set_version() functions).
Or to be able to set the values in configure() instead (which actually also works for the version attribute, instead of using set_version())
from conans import ConanFile
class ProtobufSystemConanfile(ConanFile):
def set_alias(self):
if self.settings.os.distro = Ubuntu16:
self.alias = "protobuf/3.0.0@heat-rae/stable"
else self.settings.os.distro = Ubuntu18:
self.alias = "protobuf/3.6.1@heat-rae/stable"
else:
# throw invalidConfigurationException
I would like to be able to make conditional aliases. I would like to use them to model system versions, and require them like:
With the current definition, I cannot make aliases depend on settings.
It would be cool to have a
set_alias()
function (similar toset_name()
,set_version()
functions).Or to be able to set the values in
configure()
instead (which actually also works for the version attribute, instead of usingset_version()
)The text was updated successfully, but these errors were encountered: