Add automatic build of libcapnp if it's not detected

This commit is contained in:
Jason Paryani
2014-12-11 22:04:34 -08:00
parent 02c572fe1e
commit 4c0d4ec290
11 changed files with 818 additions and 1 deletions

39
buildutils/msg.py Normal file
View File

@@ -0,0 +1,39 @@
"""logging"""
# Copyright (c) PyZMQ Developers.
# Distributed under the terms of the Modified BSD License.
from __future__ import division
import os
import sys
import logging
#-----------------------------------------------------------------------------
# Logging (adapted from h5py: http://h5py.googlecode.com)
#-----------------------------------------------------------------------------
logger = logging.getLogger()
if os.environ.get('DEBUG'):
logger.setLevel(logging.DEBUG)
else:
logger.setLevel(logging.INFO)
logger.addHandler(logging.StreamHandler(sys.stderr))
def debug(msg):
logger.debug(msg)
def info(msg):
logger.info(msg)
def fatal(msg, code=1):
logger.error("Fatal: " + msg)
exit(code)
def warn(msg):
logger.error("Warning: " + msg)
def line(c='*', width=48):
print(c * (width // len(c)))