Skip to content

Commit

Permalink
deprecate AutoPackage (#14083)
Browse files Browse the repository at this point in the history
Changelog: Fix: Deprecate ``AutoPackage`` remnant from Conan 1.X
Docs: conan-io/docs#3253
  • Loading branch information
AbrilRBS authored Jun 13, 2023
2 parents 5450cb9 + 481b3da commit bf3fc5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions conan/tools/files/packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ def __init__(self, conanfile):
self.patterns.build.include = ["*.h", "*.hpp", "*.hxx"]
self.patterns.build.lib = ["*.so", "*.so.*", "*.a", "*.lib", "*.dylib"]
self.patterns.build.bin = ["*.exe", "*.dll"]
conanfile.output.warning("AutoPackager is **** deprecated ****", warn_tag="deprecated")
conanfile.output.warning("AutoPackager **** will be removed ****", warn_tag="deprecated")
conanfile.output.warning("Use explicit copy() calls instead", warn_tag="deprecated")

def run(self):
cf = self._conanfile
Expand All @@ -58,8 +61,8 @@ def run(self):
self._package_cppinfo("build", cf.cpp.build.components[cname],
cf.cpp.package.components[cname])
else: # No components declared
self._package_cppinfo("source", cf.cpp.source, cf.cpp.package)
self._package_cppinfo("build", cf.cpp.build, cf.cpp.package)
self._package_cppinfo("source", cf.cpp.source, cf.cpp.package)
self._package_cppinfo("build", cf.cpp.build, cf.cpp.package)

def _package_cppinfo(self, origin_name, origin_cppinfo, dest_cppinfo):
"""
Expand Down
1 change: 1 addition & 0 deletions conans/test/functional/layout/test_layout_autopackage.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def package(self):
"""
client.save({"conanfile.py": conan_file})
client.run("create . --name=lib --version=1.0")
assert "AutoPackager is **** deprecated ****" in client.out
package_id = client.created_package_id("lib/1.0")

ref = RecipeReference.loads("lib/1.0@")
Expand Down

0 comments on commit bf3fc5a

Please sign in to comment.