Skip to content

Commit fef2c93

Browse files
committed
Simplify consumer package
Signed-off-by: Uilian Ries <uilianries@gmail.com>
1 parent 249976d commit fef2c93

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

examples/tools/system/package_manager/ci_test_example.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,7 @@
2222

2323
print("- Consuming Conan package ncurses/system -")
2424

25-
out = run("conan create consumer/ --version=0.1.0 {}".format(" ".join(["-c " + conf for conf in confs])))
2625

27-
assert "Conan: Target declared 'ncurses::ncurses'" in out
28-
assert "package(): Packaged 1 file: ncurses_version" in out
26+
out = run("conan build consumer/ --name=ncurses-version --version=0.1.0 {}".format(" ".join(["-c " + conf for conf in confs])))
2927

30-
match = re.search(r"Full package reference:\s*(.+)", out)
31-
assert match
32-
full_package_ref = match.group(1)
33-
34-
package_folder = run(f"conan cache path {full_package_ref}").strip()
35-
assert os.path.isdir(package_folder)
36-
ncurses_version = os.path.join(package_folder, "bin", "ncurses_version")
37-
assert os.path.isfile(ncurses_version)
38-
39-
out = run(ncurses_version)
4028
assert "Conan 2.x Examples - Installed NCurses version" in out

examples/tools/system/package_manager/consumer/conanfile.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66

77
class AppNCursesVersionConan(ConanFile):
8-
name = "ncurses-version"
98
settings = "os", "compiler", "build_type", "arch"
109
generators = "CMakeDeps", "CMakeToolchain"
1110
package_type = "application"
@@ -23,10 +22,4 @@ def build(self):
2322
cmake.configure()
2423
cmake.build()
2524

26-
def package(self):
27-
cmake = CMake(self)
28-
cmake.install()
29-
30-
def package_info(self):
31-
self.cpp_info.libdirs = []
32-
self.cpp_info.includedirs = []
25+
self.run(os.path.join(self.build_folder, "ncurses_version"), env="conanrun")

0 commit comments

Comments
 (0)