From 481b3da154000898327fdb1edfd6e6a34fe3e441 Mon Sep 17 00:00:00 2001 From: memsharded Date: Tue, 13 Jun 2023 17:51:14 +0200 Subject: [PATCH] deprecate AutoPackage --- conan/tools/files/packager.py | 7 +++++-- conans/test/functional/layout/test_layout_autopackage.py | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/conan/tools/files/packager.py b/conan/tools/files/packager.py index b26b71352a6..9903cb1155c 100644 --- a/conan/tools/files/packager.py +++ b/conan/tools/files/packager.py @@ -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 @@ -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): """ diff --git a/conans/test/functional/layout/test_layout_autopackage.py b/conans/test/functional/layout/test_layout_autopackage.py index 97ebea8e487..0cc5f30fe8d 100644 --- a/conans/test/functional/layout/test_layout_autopackage.py +++ b/conans/test/functional/layout/test_layout_autopackage.py @@ -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@")