From 639dbe8911fe8379c695baebb059a8a387622750 Mon Sep 17 00:00:00 2001 From: Michael Penkov Date: Thu, 24 Oct 2019 16:18:34 +0200 Subject: [PATCH] fix setup.py to get documentation to build under CircleCI --- setup.py | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/setup.py b/setup.py index 7b9ab04487..b2d25de48a 100644 --- a/setup.py +++ b/setup.py @@ -268,15 +268,37 @@ def finalize_options(self): linux_testenv = win_testenv[:] +# +# This list partially duplicates requirements_docs.txt. +# The main difference is that we don't include version pins here unless +# absolutely necessary, whereas requirements_docs.txt includes pins for +# everything, by design. +# +# For more info about the difference between the two: +# +# https://packaging.python.org/discussions/install-requires-vs-requirements/ +# docs_testenv = linux_testenv + distributed_env + [ 'sphinx', 'sphinxcontrib-napoleon', 'plotly', - 'pattern <= 2.6', + # + # Pattern is a PITA to install, it requires mysqlclient, which in turn + # requires MySQL dev tools be installed. We don't need it for building + # documentation. + # + # 'Pattern==3.6', # Need 3.6 or later for Py3 support 'sphinxcontrib.programoutput', 'sphinx-gallery', 'memory_profiler', 'annoy', + 'Pyro4', + 'scikit-learn', + 'nltk', + 'testfixtures', + 'statsmodels', + 'pyemd', + 'pandas', ] if sys.version_info < (3, 7): @@ -288,18 +310,6 @@ def finalize_options(self): if (3, 0) < sys.version_info < (3, 7): linux_testenv.extend(['nmslib']) -docs_testenv = linux_testenv + distributed_env + [ - 'sphinx', - 'sphinxcontrib-napoleon', - 'plotly', - 'Pattern >= 3.6', # Need 3.6 or later for Py3 support - 'sphinxcontrib.programoutput', -] -# -# Get Py2.7 docs to build, see https://github.com/RaRe-Technologies/gensim/pull/2552 -# -if sys.version_info == (2, 7): - docs_testenv.insert(0, 'doctools==0.14') ext_modules = [ Extension('gensim.models.word2vec_inner',