-
Notifications
You must be signed in to change notification settings - Fork 435
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
pin dependencies when building a package #741
Conversation
What's the use case @ilanschnell? This sounds like may be a catch-all for badly written recipes...? |
The use case is for deploying large "applications" to customers, where we want to make sure all packages are explicitly specified (to ensure nothing breaks due to different versions), in the same way "anaconda" is deployed. When you "conda install anaconda=2.3.0", all packages are specified by version and build string, and there is no question whether you (for example ) get |
Then why not create an application metapackage for that customer, like On Wed, Jan 27, 2016, 08:07 Ilan Schnell notifications@github.com wrote:
|
Yes, this is basically what this can be used for (whether you create a meta-package or a real package). The point of this PR is to make it easier to "bake" the fully specified dependencies in. |
Ilan this looks great. Thanks |
Can 'record' be the default? |
I don't want to make |
@@ -256,7 +266,8 @@ def _git_clean(source_meta): | |||
'no_link', 'binary_relocation', 'script', 'noarch_python', | |||
'has_prefix_files', 'binary_has_prefix_files', 'script_env', | |||
'detect_binary_files_with_prefix', 'rpaths', | |||
'always_include_files', 'skip', 'msvc_compiler'], | |||
'always_include_files', 'skip', 'msvc_compiler', | |||
'pin_depends'], |
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.
Add in comment here that pin_depends
is an alpha feature with names/api/etc subject to change.
Thanks @ilanschnell. Makes sense from an anaconda point of view. Interestingly though, this is essentially the same functionality as defining an environment (i.e. In terms of implementation, I have to say that I feel the code regresses some of the interfaces - essentially it rolls back some of the correctly encapsulated capabilities and replaces it with globals. Is there a strong reason for that @ilanschnell, or is it more a matter of making pragmatic choices? @kalefranz, where do you sit on this one? |
Thanks @pelson for the feedback. The globals that I have introduced should have been gloabls from the beginning, I think. It is much cleaner (and less code) to set these variables once, rather than passing them between the various functions all the time. The variables are set by the user in the CLI, so they will not change during the running process. This is exactly where globals come in handy. |
[WIP] pin dependencies when building a package
In this PR, we add the ability to create packages which list the exact versions which get installed into the test environment, even when the recipe itself does not specify those versions, using:
The integer may be set to one of the following values:
record
: only record the exact distributions ininfo/requires
strict
: use exact specs (name version build_string
) independs
for all packages.