-
Notifications
You must be signed in to change notification settings - Fork 989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always remove package folder in conan create #4918
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the idea is to delete the package_folder
every time we are going to build, I would move the remove_folder_raising(package_folder)
line to the place where the BUILD & PACKAGE
comment is (here).
It would be out of the if skip_build
and executed before the build()
method, I'm thinking about a class with the cmake.build(), cmake.install()
inside the build()
method, we need to delete the package_folder before building (not after).
Yes, you are totally right! Did not think about that. Thanks |
Requested changes done. I haven't added a test as the case fo cmake.install() in the build() method should be well covered in this test https://github.com/conan-io/conan/blob/develop/conans/test/functional/build_helpers/cmake_install_package_test.py#L46 |
But that test has a |
That test should be enough to prove that the package folder is available in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are almost there, but I have a couple of doubts 💭
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
pass | ||
""" | ||
test_conanfile = textwrap.dedent(""" | ||
from conans import ConanFile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If using dedent, better really indent the contents one more indent, so it is not aligned with test_conanfile.
Changelog: Bugfix: Remove package folder in
conan create
even when using--keep-build
Docs: omit
Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.