Closed gabrieleiannetti closed 3 years ago
Hi, this is done in the specfile, the main intention was to keep compatibility with Centos 7 with the RPMs in EPEL by installing python2-prometheus_client
instead of requiring a pip install.
This should also work with Centos 8 with python3-prometheus_client
and a different specfile.
I am not installing any package here, since I would like to modify the program and test it right away... Besides that, I could imagine, that the exporter might be executed not on CentOS or with any package build...
I will modify the existing specfile so it does not conflict with the python3 shebang.
Would be nice to run the program right away...
You could probably drop that lines in the spec file, if you would merge my pull request:
sed -i -e '1i#!/usr/bin/python' infiniband-exporter.py
install -m 0755 %{name}.py %{buildroot}/%{_bindir}/%{name}
Hi,
to execute the exporter directly I have added the required line as the header into the exporter program.
It has at least 2 reasons:
I assumed, that the exporter will run at least with version 3, so I specified explicitly. Would not keep compatibility with version 2 anyway, so I think it is a good call here.
What do you think, will you merge it into the master?
Best Gabriele