diff --git a/conans/client/cmd/new.py b/conans/client/cmd/new.py index 3e843af250b..57ad0a75688 100644 --- a/conans/client/cmd/new.py +++ b/conans/client/cmd/new.py @@ -14,7 +14,7 @@ class {package_name}Conan(ConanFile): author = " " url = "" description = "" - tags = ["", "", ""] + topics = ["", "", ""] settings = "os", "compiler", "build_type", "arch" options = {{"shared": [True, False]}} default_options = "shared=False" @@ -65,7 +65,7 @@ class {package_name}Conan(ConanFile): url = "None" license = "None" author = "None" - tags = None + topics = None def package(self): self.copy("*") @@ -84,7 +84,7 @@ class {package_name}Conan(ConanFile): author = " " url = "" description = "" - tags = ["", "", ""] + topics = ["", "", ""] settings = "os", "compiler", "build_type", "arch" options = {{"shared": [True, False]}} default_options = "shared=False" @@ -125,7 +125,7 @@ class {package_name}Conan(ConanFile): author = " " url = "" description = "" - tags = ["", "", ""] + topics = ["", "", ""] no_copy_source = True # No settings/options are necessary, this is header only diff --git a/conans/client/conan_api.py b/conans/client/conan_api.py index 7aa2e8fd350..fad6f7bae55 100644 --- a/conans/client/conan_api.py +++ b/conans/client/conan_api.py @@ -295,7 +295,7 @@ def inspect(self, path, attributes, remote_name=None): result = OrderedDict() if not attributes: attributes = ['name', 'version', 'url', 'license', 'author', 'description', - 'tags', 'generators', 'exports', 'exports_sources', 'short_paths', + 'topics', 'generators', 'exports', 'exports_sources', 'short_paths', 'apply_env', 'build_policy'] for attribute in attributes: try: diff --git a/conans/client/graph/grapher.py b/conans/client/graph/grapher.py index 966d045a0d2..07520ac8b9c 100644 --- a/conans/client/graph/grapher.py +++ b/conans/client/graph/grapher.py @@ -145,7 +145,7 @@ def graph(self): ("url", '{url}'.format(url=conanfile.url)), ("license", conanfile.license), ("author", conanfile.author), - ("tags", conanfile.tags)]: + ("topics", conanfile.topics)]: if data: data = data.replace("'", '"') fulllabel.append("
  • %s: %s
  • " % (name, data)) diff --git a/conans/client/printer.py b/conans/client/printer.py index a4f7e21d553..100b9a17982 100644 --- a/conans/client/printer.py +++ b/conans/client/printer.py @@ -113,7 +113,7 @@ def show(field): url = getattr(conan, "url", None) license_ = getattr(conan, "license", None) author = getattr(conan, "author", None) - tags = getattr(conan, "tags", None) + topics = getattr(conan, "topics", None) if url and show("url"): self._out.writeln(" URL: %s" % url, Color.BRIGHT_GREEN) @@ -124,11 +124,11 @@ def show(field): self._out.writeln(" License: %s" % license_, Color.BRIGHT_GREEN) if author and show("author"): self._out.writeln(" Author: %s" % author, Color.BRIGHT_GREEN) - if tags and show("tags"): - if isinstance(tags, (list, tuple, set)): - self._out.writeln(" Tags: %s" % ", ".join(tags), Color.BRIGHT_GREEN) + if topics and show("topics"): + if isinstance(topics, (list, tuple, set)): + self._out.writeln(" Topics: %s" % ", ".join(topics), Color.BRIGHT_GREEN) else: - self._out.writeln(" Tags: %s" % tags, Color.BRIGHT_GREEN) + self._out.writeln(" Topics: %s" % topics, Color.BRIGHT_GREEN) if isinstance(ref, ConanFileReference) and show("recipe"): # Excludes PROJECT self._out.writeln(" Recipe: %s" % node.recipe) diff --git a/conans/model/conan_file.py b/conans/model/conan_file.py index 50fb5861462..477f9b8d694 100644 --- a/conans/model/conan_file.py +++ b/conans/model/conan_file.py @@ -90,7 +90,7 @@ class ConanFile(object): license = None author = None # Main maintainer/responsible for the package, any format description = None - tags = None + topics = None build_policy = None short_paths = False apply_env = True # Apply environment variables from requires deps_env_info and profiles diff --git a/conans/test/command/info_test.py b/conans/test/command/info_test.py index ea78467e645..2f2f8c53064 100644 --- a/conans/test/command/info_test.py +++ b/conans/test/command/info_test.py @@ -511,7 +511,7 @@ class MyTest(ConanFile): author = "John Doe" license = "MIT" url = "https://foo.bar.baz" - tags = ["foo", "bar", "qux"] + topics = ["foo", "bar", "qux"] """ diff --git a/conans/test/command/inspect_test.py b/conans/test/command/inspect_test.py index f9fc0344fd9..e86bb084321 100644 --- a/conans/test/command/inspect_test.py +++ b/conans/test/command/inspect_test.py @@ -137,7 +137,7 @@ def build(self): license: None author: None description: None -tags: None +topics: None generators: ['txt'] exports: None exports_sources: None @@ -157,7 +157,7 @@ class Pkg(ConanFile): license = "MIT" description = "Yet Another Test" generators = "cmake" - tags = ["foo", "bar", "qux"] + topics = ["foo", "bar", "qux"] _private = "Nothing" def build(self): pass @@ -170,7 +170,7 @@ def build(self): license: MIT author: John Doe description: Yet Another Test -tags: ['foo', 'bar', 'qux'] +topics: ['foo', 'bar', 'qux'] generators: cmake exports: None exports_sources: None