This demonstrates issue conan-io/conan#1509.
NOTE: As discussed in the issue, the behavior demonstrated here is actually intentional and has now been documented (see conan-io/docs@46f10a1 and conan-io/docs@72b1fcb).
Build this test package with
conan test_package
The message "Test!" should be displayed twice in conan's output.
That indicates that the package()
method of conanfile.py
is executed twice during a single build.
Change the line
no_copy_source = True
in conanfile.py to
no_copy_source = False
and build the package again:
conan test_package
Now "Test!" should be displayed only once.