-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Change Travis to use pip3 for installing sphinx #2124
Conversation
Thanks for this 👍. I tried this yesterday but pip3 failed to complete the installation of sphinxcontrib. Jinja2 failed along the way. Let me post the exact changes to speed up your testing process. Here's what stopped me yesterday Here's the instructions to allow you to test things quicker Changes to travis.yml diff --git a/.travis.yml b/.travis.yml
index c8887d8..f5512e2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -27,6 +27,7 @@ addons:
- libvtk5-qt4-dev
- libglew-dev
- libopenni-dev
+ - python3-pip
before_install:
- bash .travis.sh before-install
@@ -58,32 +59,32 @@ env:
jobs:
include:
- - stage: Core Build
- env: TASK="build"
- compiler: gcc
- script: bash .travis.sh $TASK
- - env: TASK="build"
- compiler: clang
- script: bash .travis.sh $TASK
- - stage: Extended Build and Tests
- compiler: clang
- env: TASK="build-examples"
- script: bash .travis.sh $TASK
- - compiler: clang
- env: TASK="build-tools"
- script: bash .travis.sh $TASK
- - compiler: clang
- env: TASK="build-apps"
- script: bash .travis.sh $TASK
+ # - stage: Core Build
+ # env: TASK="build"
+ # compiler: gcc
+ # script: bash .travis.sh $TASK
+ # - env: TASK="build"
+ # compiler: clang
+ # script: bash .travis.sh $TASK
+ # - stage: Extended Build and Tests
+ # compiler: clang
+ # env: TASK="build-examples"
+ # script: bash .travis.sh $TASK
+ # - compiler: clang
+ # env: TASK="build-tools"
+ # script: bash .travis.sh $TASK
+ # - compiler: clang
+ # env: TASK="build-apps"
+ # script: bash .travis.sh $TASK
- compiler: gcc
env: TASK="doc"
script: bash .travis.sh $TASK
- - compiler: gcc
- env: TASK="test-core"
- script: bash .travis.sh $TASK
- - compiler: gcc
- env: TASK="test-ext-1"
- script: bash .travis.sh $TASK
- - compiler: gcc
- env: TASK="test-ext-2"
- script: bash .travis.sh $TASK
+ # - compiler: gcc
+ # env: TASK="test-core"
+ # script: bash .travis.sh $TASK
+ # - compiler: gcc
+ # env: TASK="test-ext-1"
+ # script: bash .travis.sh $TASK
+ # - compiler: gcc
+ # env: TASK="test-ext-2"
+ # script: bash .travis.sh $TASK changes to .travis.sh diff --git a/.travis.sh b/.travis.sh
index 226e462..8976ca4 100755
--- a/.travis.sh
+++ b/.travis.sh
@@ -323,9 +323,10 @@ function test_ext_2 ()
function doc ()
{
# Do not generate documentation for pull requests
- if [[ $TRAVIS_PULL_REQUEST != 'false' ]]; then exit; fi
+ # if [[ $TRAVIS_PULL_REQUEST != 'false' ]]; then exit; fi
# Install sphinx
- pip install --user sphinx pyparsing==2.1.9 sphinxcontrib-doxylink
+ # pip install --user sphinx pyparsing==2.1.9 sphinxcontrib-doxylink
+ pip3 install --user sphinxcontrib-doxylink
# Configure
mkdir $BUILD_DIR && cd $BUILD_DIR
cmake -DDOXYGEN_USE_SHORT_NAMES=OFF \
@@ -334,20 +335,21 @@ function doc ()
-DWITH_TUTORIALS=ON \
$PCL_DIR
- git config --global user.email "documentation@pointclouds.org"
- git config --global user.name "PointCloudLibrary (via TravisCI)"
+ # git config --global user.email "documentation@pointclouds.org"
+ # git config --global user.name "PointCloudLibrary (via TravisCI)"
- if [ -z "$id_rsa_{1..23}" ]; then echo 'No $id_rsa_{1..23} found !' ; exit 1; fi
+ # if [ -z "$id_rsa_{1..23}" ]; then echo 'No $id_rsa_{1..23} found !' ; exit 1; fi
- echo -n $id_rsa_{1..23} >> ~/.ssh/travis_rsa_64
- base64 --decode --ignore-garbage ~/.ssh/travis_rsa_64 > ~/.ssh/id_rsa
+ # echo -n $id_rsa_{1..23} >> ~/.ssh/travis_rsa_64
+ # base64 --decode --ignore-garbage ~/.ssh/travis_rsa_64 > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
+ # chmod 600 ~/.ssh/id_rsa
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
+ # echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
cd $DOC_DIR
- git clone git@github.com:PointCloudLibrary/documentation.git .
+ # git clone git@github.com:PointCloudLibrary/documentation.git .
+ git clone https://github.com/PointCloudLibrary/documentation.git .
# Generate documentation and tutorials
cd $BUILD_DIR
@@ -362,7 +364,7 @@ function doc ()
cd $DOC_DIR
git add --all
git commit --amend --reset-author -m "Documentation for commit $TRAVIS_COMMIT" -q
- git push --force
+ # git push --force
else
exit 2
fi |
Worth mentioning this worked for me in Ubuntu 16.04, but apparently not in 14.04. |
Yeah, I realised that once it had started running. I think I've got to the bottom of the issue though. Tha Jinja error while building is completely ignorable, in fact in newer versions of pip, it would be hidden anyway. The Once I'm convinced I've fixed it wI will update this PR to have only the appropriate changes in it. |
Make sure that needs_sphinx is a str, not a float
Ok, the last build managed to create the documentation correctly so I have rebased this PR to only have the correct changes. Once this is merged to master it should build the docs without error. |
Thanks for all the help :) 👍 |
WIP for updating Sphinx to use Python 3