-
Notifications
You must be signed in to change notification settings - Fork 970
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
[feature] Accept list for SystemPackageTool #6961
Comments
The documentation states it can use a list (in a single string) and the implementation tries to work with a list too: def install(self, packages, update=True, force=False, arch_names=None):
""" Get the system package tool install command.
:param packages: String with all package to be installed e.g. "libusb-dev libfoobar-dev"
"""
packages = [packages] if isinstance(packages, str) else list(packages) Probably this is not a feature, but a bug as it is not working as expected (and it has already the ability to work with a list/string-list). Here we need to fix a couple of things and probably fixing them will cover this feature. I'm closing this one in favor of #6960 |
The documentation says :
This feature request is about installing different packages at same time: e.g. def system_requirements(self):
installer = tools.SystemPackageTool()
installer.install(["curl", "vim", "cowsay"]) Using this code, with the current implementation, Conan install will Curl, and end the execution. However, if we pass to accept a list of packages, we would break the current behavior, so we need an alternative, maybe a new parameter: def system_requirements(self):
installer = tools.SystemPackageTool(all=True)
installer.install(["curl", "vim", "cowsay"]) The parameter |
Support different packages to be installed by a single list Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Co-authored-by: Javier G. Sogo <jgsogo@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
* #6961 Install all system packages Support different packages to be installed by a single list Signed-off-by: Uilian Ries <uilianries@gmail.com> * restart ci Signed-off-by: Uilian Ries <uilianries@gmail.com> * Separate command for installing all packages Signed-off-by: Uilian Ries <uilianries@gmail.com> * Rename unit test name for install system packages Co-authored-by: Javier G. Sogo <jgsogo@gmail.com> * Rename install packages method name Signed-off-by: Uilian Ries <uilianries@gmail.com> * #6961 Accept variants and packages at same input Signed-off-by: Uilian Ries <uilianries@gmail.com> * #6961 Fix single system package install Co-authored-by: Javier G. Sogo <jgsogo@gmail.com> * #6961 Install only what is needed Signed-off-by: Uilian Ries <uilianries@gmail.com> * #6961 Update install_packages docstring Signed-off-by: Uilian Ries <uilianries@gmail.com> * Sort package list Signed-off-by: Uilian Ries <uilianries@gmail.com> * #6961 Do not accept more than 1 pkg per str Signed-off-by: Uilian Ries <uilianries@gmail.com> * Update conans/client/tools/system_pm.py * #6961 Improve install steps Signed-off-by: Uilian Ries <uilianries@gmail.com> * Remove env var Signed-off-by: Uilian Ries <uilianries@gmail.com> Co-authored-by: Javier G. Sogo <jgsogo@gmail.com>
The SystemPackageTool class offers the method
install
which only supports a string with all packages to be installed. However, even a list of packages must be passed as a string, it's a bit confuse, and get worst if you need to check if it's installed or not before: #6960 (comment)It would be great accepting both string (backward) and list:
The text was updated successfully, but these errors were encountered: