Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force python2.7 for building documentation #1840

Merged
merged 2 commits into from
Jan 15, 2018
Merged

Force python2.7 for building documentation #1840

merged 2 commits into from
Jan 15, 2018

Conversation

menshikh-iv
Copy link
Contributor

@menshikh-iv menshikh-iv commented Jan 15, 2018

Introduction

This problem discovered by @CLearERR and @anotherbugmaster when they runs tox -e docs, i.e. build documentation from sources on the linux system. After it, they received error

Collecting pattern (from gensim==3.2.0)
  Using cached pattern-2.6.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-w_xt55t1/pattern/setup.py", line 40
        print n
              ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print(int n)?
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-w_xt55t1/pattern/
ERROR: could not install deps [.[docs]]; v = InvocationError("'/home/ivan/release/gensim/.tox/docs/bin/pip install --timeout=60 --trusted-host 28daf2247a33ed269873-7b1aad3fab3cc330e1fd9d109892382a.r6.cf2.rackcdn.com --find-links http://28daf2247a33ed269873-7b1aad3fab3cc330e1fd9d109892382a.r6.cf2.rackcdn.com/ numpy==1.11.3 scipy==0.18.1 .[docs]'", 1)
docs finish: getenv after 51.83 seconds

What happens and why

Obviously, that we see the problem with python3 incompatible code (thanks "pattern") and python3 as the backend for tox.
This happens because I added pattern to dependencies for documentation (this is really needed to install all stuff for build full documentation)
https://github.com/RaRe-Technologies/gensim/pull/1797/files#diff-2eeaed663bd0d25b7e608891384b7298R310

Also, sphinx strongly recommend to use python2 for documentation building (not related with this problem, but we want to follow this recommendation)

Solution

Pin python version explicitly to 2.

@menshikh-iv menshikh-iv merged commit 2c3c91c into develop Jan 15, 2018
@menshikh-iv menshikh-iv deleted the force-py2 branch January 15, 2018 19:29
sj29-innovate pushed a commit to sj29-innovate/gensim that referenced this pull request Feb 21, 2018
* force py2 for build documentation

* 2.7 -> 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant