Skip to content

Commit 09fb2c0

Browse files
committed
Use python logging module in build process
1 parent ccbbbb0 commit 09fb2c0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

setup_pjsip.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,13 @@
6464
os.environ['CFLAGS'] = os.environ.get('CFLAGS', '') + local_cflags
6565
os.environ['LDFLAGS'] = os.environ.get('LDFLAGS', '') + local_ldflags
6666

67-
from distutils import log
67+
import logging
6868
from distutils.dir_util import copy_tree
6969
from distutils.errors import DistutilsError
7070

71+
logging.basicConfig(level=logging.DEBUG, format="%(message)s")
72+
log = logging.getLogger(__name__)
73+
7174
from Cython import __version__ as cython_version
7275
from Cython.Distutils import build_ext
7376

@@ -122,6 +125,7 @@ class PJSIP_build_ext(build_ext):
122125
def distutils_exec_process(cmdline, silent=True, input=None, **kwargs):
123126
"""Execute a subprocess and returns the returncode, stdout buffer and stderr buffer.
124127
Optionally prints stdout and stderr while running."""
128+
125129
try:
126130
sub = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs)
127131
stdout, stderr = sub.communicate(input=input)

0 commit comments

Comments
 (0)