Closed cchulo closed 2 years ago
imo, it feels a bit cumbersome to have to list out distros, couldn't it use shutil
instead?
The check could be something like:
import shutil
# ...
@property
def with_pacman(self):
if self.is_linux:
return shutil.which('pacman') != None
# ...
This will then take care of any flavor of Arch in the future, only requirement is shutil is only available in python 3.3+, if there is a need for compatibility with all of python3, you could add a custom which command as found here
Hi @cchulo
There is a difference in a tool being installed in the system, and users really wanting to run that tool. It is not impossible to have a pacman executable in your Linux system that is the pacman videogame (for other distros), for example.
Also Conan will try in general not having to guess. So what it has is defined a common default mapping of OS-system package managers. If you want to add EndeavourOS to that list, pull requests are welcome! Note that we are talking about the new tooling in https://docs.conan.io/en/latest/reference/conanfile/tools/system/package_manager.html, not the legacy ones you are referring above, that will not be changed now that we are already in 2.0-beta.
Also in the meantime, it is simple to define that you want to run pacman, if you check that doc, you can see that the conf
tools.system.package_manager:tool
allows you to define pacman
, and everything should work.
@memsharded ah that is a good point, I had not considered that
Your proposed solution should work, I will try it. I will create a pull request anyway to include this string addition.
@memsharded ah that is a good point, I had not considered that
Yeah, we have learned from experience, some distros containing more than one system package manager, and then everything was a mess, distros with matching applications that were no system package managers... the only way was to allow users to explicitly define the tool they want (besides a hardcoded default for most common distros)
@memsharded thank you very much for the guidance, running my installation script worked with these additional options:
tools.system.package_manager:tool=pacman
tools.system.package_manager:mode=install
tools.system.package_manager:sudo=True
Closed by https://github.com/conan-io/conan/pull/11971, will be in 1.53. Thanks very much for the fix!
Environment Details (include every applicable attribute)
Steps to reproduce (Include if Applicable)
In a python interpreter
We need to add
endeavouros
to this lineLogs (Executed commands with output) (Include/Attach if Applicable)
As a result of the above, OpenGL recipe doesn't know how to install itself, xorg/system also fails to install some dependencies as well