When writing a Python package, I know how to specify other required Python packages in the setup.py
file thanks to the field install_requires
from setuptools.setup
.
However, I do not know how to specify external system dependencies that are NOT Python packages, i.e. a commands such as git
or cmake
(examples) that my package could call via subprocess.call
or subprocess.Popen
?
Do I have to manually check the availability of the commands in my setup.py
file, or is there a fancy way to specify system requirements?
Edit: I just want to be able to check if the external tools are available, and if not invite the user to install them (by themself). I do not want to manage the installation of external tools when installing the package.
Summary of contributions: it seems that setuptools
has no support for this, and it would be safer to do the check at runtime (c.f. comments and answers).