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
Set environment variables in conaninfo.txt when using export-pkg #6607
Merged
memsharded
merged 6 commits into
conan-io:develop
from
czoido:issue/6603-env-propagation-export-pkg
Mar 4, 2020
Merged
Set environment variables in conaninfo.txt when using export-pkg #6607
memsharded
merged 6 commits into
conan-io:develop
from
czoido:issue/6603-env-propagation-export-pkg
Mar 4, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
memsharded
requested changes
Mar 3, 2020
conans/client/cmd/export_pkg.py
Outdated
@@ -43,6 +43,11 @@ def export_pkg(app, recorder, full_ref, source_folder, build_folder, package_fol | |||
|
|||
recipe_hash = layout.recipe_manifest().summary_hash | |||
conanfile.info.recipe_hash = recipe_hash | |||
|
|||
for package_name, env_vars in conanfile._conan_env_values.data.items(): |
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.
Looks good, please improve with small refactors:
- Code is almost duplicated from
def _propagate_info(node):
. Extract the logic to a common place, and call it from here and_propagate_info()
. I think that the filtering of information from dependencies might be necessary too. - Call the new method closer to the above
load_deps_info()
call. Wrap it in a new private function here in this file that could be called something like_init_conanfile_infos()
memsharded
pushed a commit
to memsharded/conan
that referenced
this pull request
Mar 9, 2020
…an-io#6607) * set conaninfo environment variables * add test * fix indentation * refactor and filter deps * fix variable name * fix format
memsharded
added a commit
that referenced
this pull request
Mar 9, 2020
* allow adding deps in lockfiles * working in augment * working * first version passing tests * fix tests and build_info * separate build-requires, sorted nodes, better status * fix broken tests * test checking older versions of lockfiles * update docstring * merged develop * dynamic lockfiles * dynamic test * working with remove_orphans, but complicated for build_requires * removed remove_orphans logic * test passing * [refact] Run 'conanfile::build()' only once in the sources (#6602) * run build and related hooks in one single point * duplicate arg * prefer calling * need to change the tests, message changes * rename to 'run_build_method' * build_folder is already assigned to the conanfile * removing dead file (#6615) * fix issue parsing system_libs field (#6616) * Set environment variables in conaninfo.txt when using export-pkg (#6607) * set conaninfo environment variables * add test * fix indentation * refactor and filter deps * fix variable name * fix format * capture the expected exception (#6622) * new test * opt-in relax_lockfile Co-authored-by: Javier G. Sogo <jgsogo@gmail.com> Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changelog: Bugfix: Environment variables from the profiles are not set in the conaninfo.txt file of the packages exported with the
export-pkg
command.Docs: Omit
Closes: #6603
develop
branch, documenting this one.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.