check_output was added in python 2.7. There are already calls earlier in setup.py to run curl-config with --libs and --static-libs so you should be able to simply use `optbuf`.