Skip to content

Commit

Permalink
Merged develop
Browse files Browse the repository at this point in the history
  • Loading branch information
lasote committed Jun 17, 2022
2 parents fa83005 + 22d083d commit 854f082
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion conans/model/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ def package_id(self):
package_id = sha1(text.encode())
return package_id

def header_only(self):
def clear(self):
self.settings.clear()
self.options.clear()
self.requires.clear()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class HeaderOnly(ConanFile):
{% endif %}
def package_id(self):
self.info.header_only()
self.info.clear()
def package_info(self):
self.cpp_info.includedirs = []
Expand Down
2 changes: 1 addition & 1 deletion conans/test/integration/conanfile/test_attributes_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_info_not_in_package(self):
class Recipe(ConanFile):
def package(self):
self.info.header_only()
self.info.clear()
""")
t.save({'conanfile.py': conanfile})
t.run('create . --name=name --version=version -s os=Linux', assert_error=True)
Expand Down
2 changes: 1 addition & 1 deletion conans/test/integration/graph/core/test_provides.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def configure(self):
self.provides = 'libjpeg'
def package_info(self):
self.info.header_only()
self.info.clear()
""")
t = TestClient()
t.save({'requires.py': GenConanfile("req", "v1").with_provides("libjpeg"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ class SumConan(ConanFile):
def build(self):
self.output.warning("My compiler is '{}'".format(self.settings.compiler))
def package_id(self):
self.info.header_only()
self.info.clear()
""")

client = TestClient()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def test_transitive_second_level_header_only(self):
client.run("create . --name=libb --version=1.0")
# libC -> libB

unrelated = "self.info.header_only()"
unrelated = "self.info.clear()"
client.save({"conanfile.py": GenConanfile().with_require("libb/1.0")
.with_package_id(unrelated)})
client.run("create . --name=libc --version=1.0")
Expand Down Expand Up @@ -145,7 +145,7 @@ def test_transitive_header_only(self):
client.run("create . --name=liba --version=1.0")
client.run("create . --name=liba --version=2.0")
client.save({"conanfile.py": GenConanfile().with_require("liba/1.0")
.with_package_id("self.info.header_only()")})
.with_package_id("self.info.clear()")})
client.run("create . --name=libb --version=1.0")
client.save({"conanfile.py": GenConanfile().with_require("libb/1.0")})
client.run("create . --name=libc --version=1.0")
Expand Down
2 changes: 1 addition & 1 deletion conans/test/unittests/model/info_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_modes(self):
shared=False
'''
info = ConanInfo.loads(info_text)
info.header_only()
info.clear()
self.assertEqual(info.settings.dumps(), "")
self.assertEqual(info.options.dumps(), "")
self.assertEqual(info.requires.dumps(), "")
Expand Down

0 comments on commit 854f082

Please sign in to comment.