mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-26 15:49:40 +02:00
fix: rtd
This commit is contained in:
parent
a3b8677f1d
commit
2ad9fbbdcd
2 changed files with 17 additions and 5 deletions
|
|
@ -26,6 +26,17 @@ sys.path.insert(0, os.path.abspath('../../GPy/'))
|
||||||
|
|
||||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||||
|
|
||||||
|
import sys
|
||||||
|
from unittest.mock import MagicMock
|
||||||
|
|
||||||
|
class Mock(MagicMock):
|
||||||
|
@classmethod
|
||||||
|
def __getattr__(cls, name):
|
||||||
|
return MagicMock()
|
||||||
|
|
||||||
|
MOCK_MODULES = ["GPy.linalg.linalg_cython", "sympy"]
|
||||||
|
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
|
||||||
|
|
||||||
#on_rtd = True
|
#on_rtd = True
|
||||||
if on_rtd:
|
if on_rtd:
|
||||||
# sys.path.append(os.path.abspath('../GPy'))
|
# sys.path.append(os.path.abspath('../GPy'))
|
||||||
|
|
@ -33,10 +44,10 @@ if on_rtd:
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
# build extensions:
|
# build extensions:
|
||||||
proc = subprocess.Popen("cd ../../; python setup.py build_ext develop", stdout=subprocess.PIPE, shell=True)
|
# proc = subprocess.Popen("cd ../../; python setup.py build_ext develop", stdout=subprocess.PIPE, shell=True)
|
||||||
(out, err) = proc.communicate()
|
# (out, err) = proc.communicate()
|
||||||
print("build_ext develop:")
|
# print("build_ext develop:")
|
||||||
print(out)
|
# print(out)
|
||||||
|
|
||||||
# print current folder:
|
# print current folder:
|
||||||
proc = subprocess.Popen("pwd", stdout=subprocess.PIPE, shell=True)
|
proc = subprocess.Popen("pwd", stdout=subprocess.PIPE, shell=True)
|
||||||
|
|
|
||||||
|
|
@ -5,3 +5,4 @@ decorator
|
||||||
matplotlib
|
matplotlib
|
||||||
paramz
|
paramz
|
||||||
cython
|
cython
|
||||||
|
mock
|
||||||
Loading…
Add table
Add a link
Reference in a new issue