systemd recently started using python-config to detect python. This method is outdated and the modern way is to use pkg-config modules which are installed in python2.7+. $ pkg-config --cflags --libs python-2.7 -I/usr/include/python2.7 -lpython2.7
That would simplify a lot of things for us. But it seems to be only available from 2.7, but we support 2.6 now. I guess we could drop support for 2.6. One advantage of python-config is that it is easy to go from python-config to python by simple string substitution. Let's say that I detect flags and libs for some python. How do I know which binary to call?
(In reply to comment #1) > That would simplify a lot of things for us. But it seems to be only > available from 2.7, but we support 2.6 now. I guess we could drop support > for 2.6. Well, as the summary states, I was suggesting using it and default and having a fallback to python-config. But either way's fine, I think. > One advantage of python-config is that it is easy to go from python-config > to python by simple string substitution. Let's say that I detect flags and > libs for some python. How do I know which binary to call? I'd say it's just another substitution. Since you would call: $ pkg-config --libs python-${PYTHON_VERSION} You could just go for: python${PYTHON_VERSION} However, I'm not sure where you would need that.
Fixed in http://cgit.freedesktop.org/systemd/systemd/commit/?id=a6c0b31d5.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.