Unverified Commit eec70e86 authored by Thomas Wiecki's avatar Thomas Wiecki Committed by GitHub

Move logging import as well as set_compiler_flags up. (#3894)

* Move logging import as well as set_compiler_flags up. They seem to otherwise not be picked up on newer python versions.

* Add Python 3.8 qualifier.

* Remove white-space.
parent 2d7d1d0d
......@@ -15,6 +15,31 @@
# pylint: disable=wildcard-import
__version__ = "3.8"
import logging
_log = logging.getLogger("pymc3")
if not logging.root.handlers:
_log.setLevel(logging.INFO)
if len(_log.handlers) == 0:
handler = logging.StreamHandler()
_log.addHandler(handler)
def __set_compiler_flags():
# Workarounds for Theano compiler problems on various platforms
import platform
import theano
system = platform.system()
if system == "Windows":
theano.config.mode = "FAST_COMPILE"
elif system == "Darwin":
theano.config.gcc.cxxflags = "-Wno-c++11-narrowing"
__set_compiler_flags()
from .blocking import *
from .distributions import *
from .distributions import transforms
......@@ -50,27 +75,3 @@ from .plots import *
from .tests import test
from .data import *
def __set_compiler_flags():
# Workarounds for Theano compiler problems on various platforms
import platform
import theano
system = platform.system()
if system == "Windows":
theano.config.mode = "FAST_COMPILE"
elif system == "Darwin":
theano.config.gcc.cxxflags = "-Wno-c++11-narrowing"
__set_compiler_flags()
import logging
_log = logging.getLogger("pymc3")
if not logging.root.handlers:
_log.setLevel(logging.INFO)
if len(_log.handlers) == 0:
handler = logging.StreamHandler()
_log.addHandler(handler)
......@@ -30,6 +30,7 @@ classifiers = ['Development Status :: 5 - Production/Stable',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'License :: OSI Approved :: Apache Software License',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment