Skip to content

Commit

Permalink
Merge pull request #5 from pypr/log-messages
Browse files Browse the repository at this point in the history
Log extension module messages.
  • Loading branch information
prabhuramachandran committed Jan 29, 2019
2 parents f6a9995 + 1b2989a commit 79ca0d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions compyle/ext_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import hashlib
import imp
import importlib
import logging
import numpy
import os
from os.path import dirname, exists, expanduser, isdir, join
Expand All @@ -30,6 +31,9 @@
from .capture_stream import CaptureMultipleStreams # noqa: 402


logger = logging.getLogger(__name__)


def get_platform_dir():
return 'py{version}-{platform_dir}'.format(
version=sys.version[:3], platform_dir=get_platform()
Expand Down Expand Up @@ -278,5 +282,6 @@ def _get_extra_args(self):
return ec, el

def _message(self, *args):
logger.info(args)
if self.verbose:
print(' '.join(args))
2 changes: 1 addition & 1 deletion compyle/transpiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def get_code(self):
def compile(self):
if self.backend == 'cython':
self.source = self.get_code()
mod = ExtModule(self.source, verbose=True)
mod = ExtModule(self.source)
self.mod = mod.load()
elif self.backend == 'opencl':
import pyopencl as cl
Expand Down

0 comments on commit 79ca0d4

Please sign in to comment.