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
[question] export-pkg use of attributes in_local_cache and develop #2513
Comments
About the The package method will be called twice, one with the specified source folder as the current folder, and another one with the specified build folder. (if they are the same it won't be called twice). So you have to pass the correct source folder to the command, just the same as the
|
Update: The |
The |
How does it relate to sources location? Indirectly. Stems from in-source builds where I have the conanfile.py inside my source repository and wishing to sometimes build via source() against a versioned tag and other times from my local sources without a tag. (Issue##2291) When the source() method is invoked, it does so after the exports have been copied to the source folder. Not entirely certain why exports needs to come before source() but it does and ensures that the self.source_folder is not an empty folder if an exports attribute is provided. In the source() when cloning from a git repository, git will except a folder of "." to clone into provided it is an empty folder. Because of the exports, we need to clone into a sub-folder to ensure we have an empty folder. So, in my scenario building from a git tag ends up in a sub-folder under self.source_folder. The package() method is thus relative to the sub-folder for locating includes. For all the commands which take a source folder as an option, the ideal scenario is to just pass the actual source folder. But since source() didn't get called I end up in a scenario within package() that sometimes my source is in a sub-folder while other times it is the self.source_folder with no way to nicely tell. Some approaches:
|
So most likely, yes, I think the Overall, I think there are possible improvements that can be done for #2291, that will alleviate some of the things reported here. We have been discussing possibilities, we will be talking in that #2291 issue. |
Done, the fix will be released in 1.1 (develop=True) for export-pkg. The rest of the issues can be followed in #2291, but please comment or re-open this issue or a new one if you think it is necessary. Thanks! |
With conan 1.0.4, when invoking,
conan export-pkg -bf build -if build -sf . -f . owner/channel
The attributes are in_local_cache=True and develop=False but I don't think they should be since at the point that it is invoked we are exporting to the local_cache.
It is problematic because I don't know where my sources are when packaging because they are really based upon how it is being built either via install (with source()) or a manual build declaring source locations followed by the export-pkg. While the build operation knows from either attribute, export-pkg offers no such clues.
It stems from the fact that my source() clones from git necessarily into a sub-folder to ensure it is empty. While manually building/export-pkg it is truly the source_folder. Thus the package() operation may or may not be in a sub-folder.
I can always copy from both locations with no real impact, just feels that export-pkg is inconsistent with respect to those variables.
Thanks!
The text was updated successfully, but these errors were encountered: