diff --git a/setup.py b/setup.py index 5153f8e..a642efb 100755 --- a/setup.py +++ b/setup.py @@ -33,13 +33,14 @@ def check_libraries(): args = 'gcc -ltgvoip'.split() - out = subprocess.run(args, stderr=subprocess.PIPE).stderr.decode() - match = re.findall(r'cannot find -l(\w+)', out) - if match: - raise RuntimeError( - 'Following libraries are not installed: {}\nFor guide on installing libtgvoip refer ' - 'https://github.com/bakatrouble/pytgvoip/blob/master/docs/libtgvoip.md'.format(', '.join(match)) - ) + with subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) as process: + stdout, stderr = process.communicate() + match = re.findall(r'cannot find -l(\w+)', stderr.decode()) + if match: + raise RuntimeError( + 'Following libraries are not installed: {}\nFor guide on installing libtgvoip refer ' + 'https://github.com/bakatrouble/pytgvoip/blob/master/docs/libtgvoip.md'.format(', '.join(match)) + ) class CMakeExtension(Extension): diff --git a/src/tgvoip/__init__.py b/src/tgvoip/__init__.py index fab02f8..e0d0721 100644 --- a/src/tgvoip/__init__.py +++ b/src/tgvoip/__init__.py @@ -20,4 +20,4 @@ from tgvoip.tgvoip import * from tgvoip.tgvoip import __all__ -__version__ = '0.0.2.2' +__version__ = '0.0.2.3'