Skip to content

Fix Platform.sh Build #7402

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

Closed
wants to merge 1 commit into from

Conversation

robfrawley
Copy link
Contributor

See #7265 (comment) and #7265 (comment) for additional info.

@robfrawley robfrawley changed the title Attempt to fix build on platform.sh [WIP] Fix Platform.sh Build Jan 22, 2017
@robfrawley
Copy link
Contributor Author

@javiereguiluz Can you obtain the build log for this PR on platform.sh?

@javiereguiluz
Copy link
Member

Found 15695 commits.

Building application 'symfonydocs' (runtime type: php, tree: 5e1a43b)
  Generating runtime configuration.
  
  Moving the application to the output directory
  Executing build hook...
    Downloading/unpacking git+https://github.com/fabpot/sphinx-php.git
      Cloning https://github.com/fabpot/sphinx-php.git to /tmp/pip-NoRcjy-build
      Running setup.py egg_info for package from git+https://github.com/fabpot/sphinx-php.git
        
    Downloading/unpacking Sphinx>=0.6 (from sphinx-php==1.0)
      Storing download in cache at /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fe3%2F87%2Fe271f7f0d498c7fdaec009c27955401d18ef357c0d468e1eb2be36bdc68c%2FSphinx-1.5.2.tar.gz
      Running setup.py egg_info for package Sphinx
        
        warning: no files found matching 'sphinx/locale/.tx/config'
        no previously-included directories found matching 'doc/_build'
        no previously-included directories found matching 'sphinx/locale/.tx'
    Downloading/unpacking six>=1.5 (from Sphinx>=0.6->sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fb3%2Fb2%2F238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db%2Fsix-1.10.0.tar.gz
      Running setup.py egg_info for package six
        
        no previously-included directories found matching 'documentation/_build'
    Downloading/unpacking Jinja2>=2.3 (from Sphinx>=0.6->sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2Ff4%2F3f%2F28387a5bbc6883082c16784c6135440b94f9d5938fb156ff579798e18eda%2FJinja2-2.9.4.tar.gz
      Running setup.py egg_info for package Jinja2
        
        warning: no files found matching 'run-tests.py'
        warning: no files found matching '*' under directory 'custom_fixers'
        warning: no files found matching '*' under directory 'jinja2/testsuite/res'
        warning: no previously-included files matching '*' found under directory 'docs/_build'
        warning: no previously-included files matching '*.pyc' found under directory 'jinja2'
        warning: no previously-included files matching '*.pyc' found under directory 'docs'
        warning: no previously-included files matching '*.pyo' found under directory 'jinja2'
        warning: no previously-included files matching '*.pyo' found under directory 'docs'
    Downloading/unpacking Pygments>=2.0 (from Sphinx>=0.6->sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fb8%2F67%2Fab177979be1c81bc99c8d0592ef22d547e70bb4c6815c383286ed5dec504%2FPygments-2.1.3.tar.gz
      Running setup.py egg_info for package Pygments
        
    Downloading/unpacking docutils>=0.11 (from Sphinx>=0.6->sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2F05%2F25%2F7b5484aca5d46915493f1fd4ecb63c38c333bd32aa9ad6e19da8d08895ae%2Fdocutils-0.13.1.tar.gz
      Running setup.py egg_info for package docutils
        
        warning: no files found matching 'MANIFEST'
        warning: no previously-included files matching '*.pyc' found under directory '*'
        warning: no previously-included files matching '*~' found under directory '*'
        warning: no previously-included files matching '.DS_Store' found under directory '*'
    Downloading/unpacking snowballstemmer>=1.1 (from Sphinx>=0.6->sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2F20%2F6b%2Fd2a7cb176d4d664d94a6debf52cd8dbae1f7203c8e42426daa077051d59c%2Fsnowballstemmer-1.2.1.tar.gz
      Running setup.py egg_info for package snowballstemmer
        
        warning: no files found matching '*.py' under directory 'src'
    Downloading/unpacking babel>=1.3,!=2.0 (from Sphinx>=0.6->sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2F6e%2F96%2Fba2a2462ed25ca0e651fb7b66e7080f5315f91425a07ea5b34d7c870c114%2FBabel-2.3.4.tar.gz
      Running setup.py egg_info for package babel
        
        warning: no previously-included files matching '*' found under directory 'docs/_build'
        warning: no previously-included files matching '*.pyc' found under directory 'tests'
        warning: no previously-included files matching '*.pyo' found under directory 'tests'
    Downloading/unpacking alabaster>=0.7,<0.8 (from Sphinx>=0.6->sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2F71%2Fc3%2F70da7d8ac18a4f4c502887bd2549e05745fa403e2cd9d06a8a9910a762bc%2Falabaster-0.7.9.tar.gz
      Running setup.py egg_info for package alabaster
        
        warning: no files found matching 'README.md'
        warning: no previously-included files matching '.*.swp' found under directory 'alabaster'
    Downloading/unpacking imagesize (from Sphinx>=0.6->sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2F53%2F72%2F6c6f1e787d9cab2cc733cf042f125abec07209a58308831c9f292504e826%2Fimagesize-0.7.1.tar.gz
      Running setup.py egg_info for package imagesize
        
    Downloading/unpacking requests>=2.4.0 (from Sphinx>=0.6->sphinx-php==1.0)
      Storing download in cache at /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fb6%2F61%2F7b374462d5b6b1d824977182db287758d549d8680444bad8d530195acba2%2Frequests-2.12.5.tar.gz
      Running setup.py egg_info for package requests
        
        warning: no files found matching 'test_requests.py'
    Downloading/unpacking MarkupSafe>=0.23 (from Jinja2>=2.3->Sphinx>=0.6->sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fc0%2F41%2Fbae1254e0396c0cc8cf1751cb7d9afc90a602353695af5952530482c963f%2FMarkupSafe-0.23.tar.gz
      Running setup.py egg_info for package MarkupSafe
        
    Downloading/unpacking pytz>=0a (from babel>=1.3,!=2.0->Sphinx>=0.6->sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2F42%2F00%2F5c89fc6c9b305df84def61863528e899e9dccb196f8438f6cbe960758fc5%2Fpytz-2016.10.tar.gz
      Running setup.py egg_info for package pytz
        
    Installing collected packages: Sphinx, sphinx-php, six, Jinja2, Pygments, docutils, snowballstemmer, babel, alabaster, imagesize, requests, MarkupSafe, pytz
      Running setup.py install for Sphinx
        
        warning: no files found matching 'sphinx/locale/.tx/config'
        no previously-included directories found matching 'doc/_build'
        no previously-included directories found matching 'sphinx/locale/.tx'
        Installing sphinx-apidoc script to /app/.global/bin
        Installing sphinx-build script to /app/.global/bin
        Installing sphinx-quickstart script to /app/.global/bin
        Installing sphinx-autogen script to /app/.global/bin
      Running setup.py install for sphinx-php
        
      Running setup.py install for six
        
        no previously-included directories found matching 'documentation/_build'
      Running setup.py install for Jinja2
        
        warning: no files found matching 'run-tests.py'
        warning: no files found matching '*' under directory 'custom_fixers'
        warning: no files found matching '*' under directory 'jinja2/testsuite/res'
        warning: no previously-included files matching '*' found under directory 'docs/_build'
        warning: no previously-included files matching '*.pyc' found under directory 'jinja2'
        warning: no previously-included files matching '*.pyc' found under directory 'docs'
        warning: no previously-included files matching '*.pyo' found under directory 'jinja2'
        warning: no previously-included files matching '*.pyo' found under directory 'docs'
        SyntaxError: ('invalid syntax', ('/app/.global/lib/python2.7/site-packages/jinja2/asyncfilters.py', 7, 9, 'async def auto_to_seq(value):\n'))
        
        SyntaxError: ('invalid syntax', ('/app/.global/lib/python2.7/site-packages/jinja2/asyncsupport.py', 22, 9, 'async def concat_async(async_gen):\n'))
        
      Running setup.py install for Pygments
        
        Installing pygmentize script to /app/.global/bin
      Running setup.py install for docutils
        changing mode of build/scripts-2.7/rst2html.py from 644 to 755
        changing mode of build/scripts-2.7/rst2html5.py from 644 to 755
        changing mode of build/scripts-2.7/rst2s5.py from 644 to 755
        changing mode of build/scripts-2.7/rst2latex.py from 644 to 755
        changing mode of build/scripts-2.7/rst2xetex.py from 644 to 755
        changing mode of build/scripts-2.7/rst2man.py from 644 to 755
        changing mode of build/scripts-2.7/rst2xml.py from 644 to 755
        changing mode of build/scripts-2.7/rst2pseudoxml.py from 644 to 755
        changing mode of build/scripts-2.7/rstpep2html.py from 644 to 755
        changing mode of build/scripts-2.7/rst2odt.py from 644 to 755
        changing mode of build/scripts-2.7/rst2odt_prepstyles.py from 644 to 755
        
        warning: no files found matching 'MANIFEST'
        warning: no previously-included files matching '*.pyc' found under directory '*'
        warning: no previously-included files matching '*~' found under directory '*'
        warning: no previously-included files matching '.DS_Store' found under directory '*'
        changing mode of /app/.global/bin/rst2xetex.py to 755
        changing mode of /app/.global/bin/rst2html.py to 755
        changing mode of /app/.global/bin/rst2odt.py to 755
        changing mode of /app/.global/bin/rst2odt_prepstyles.py to 755
        changing mode of /app/.global/bin/rst2html5.py to 755
        changing mode of /app/.global/bin/rst2pseudoxml.py to 755
        changing mode of /app/.global/bin/rst2s5.py to 755
        changing mode of /app/.global/bin/rst2xml.py to 755
        changing mode of /app/.global/bin/rstpep2html.py to 755
        changing mode of /app/.global/bin/rst2man.py to 755
        changing mode of /app/.global/bin/rst2latex.py to 755
      Running setup.py install for snowballstemmer
        
        warning: no files found matching '*.py' under directory 'src'
      Running setup.py install for babel
        
        warning: no previously-included files matching '*' found under directory 'docs/_build'
        warning: no previously-included files matching '*.pyc' found under directory 'tests'
        warning: no previously-included files matching '*.pyo' found under directory 'tests'
        Installing pybabel script to /app/.global/bin
      Running setup.py install for alabaster
        
        warning: no files found matching 'README.md'
        warning: no previously-included files matching '.*.swp' found under directory 'alabaster'
      Running setup.py install for imagesize
        
      Found existing installation: requests 2.5.2
        Uninstalling requests:
    Exception:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 104, in main
        status = self.run(options, args)
      File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 250, in run
        requirement_set.install(install_options, global_options)
      File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1129, in install
        requirement.uninstall(auto_confirm=True)
      File "/usr/lib/python2.7/dist-packages/pip/req.py", line 486, in uninstall
        paths_to_remove.remove(auto_confirm)
      File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1431, in remove
        renames(path, new_path)
      File "/usr/lib/python2.7/dist-packages/pip/util.py", line 263, in renames
        shutil.move(old, new)
      File "/usr/lib/python2.7/shutil.py", line 299, in move
        rmtree(src)
      File "/usr/lib/python2.7/shutil.py", line 252, in rmtree
        onerror(os.remove, fullname, sys.exc_info())
      File "/usr/lib/python2.7/shutil.py", line 250, in rmtree
        os.remove(fullname)
    OSError: [Errno 30] Read-only file system: '/usr/lib/pymodules/python2.7/requests/__init__.py'
    
    Storing complete log in /app/.pip/pip.log
    make: Entering directory `/app/_build'
    /app/.local/bin/sphinx-build -b html -c . -d ./doctrees   ../ ./html
    make: Leaving directory `/app/_build'
    make: /app/.local/bin/sphinx-build: Command not found
    make: *** [html] Error 127
  
  E: Error building project: The build hook failed with status code 2. Aborted build.

E: Error building the project: Unable to build project, aborting deployment.

@robfrawley robfrawley force-pushed the bug-fix-platformsh-build branch from fb0dcd1 to 21fbfef Compare January 22, 2017 19:10
@robfrawley
Copy link
Contributor Author

@javiereguiluz There isn't a way to publicly see the build log, is there?

@javiereguiluz
Copy link
Member

@robfrawley I'm afraid is not. This is the new log:

Found 2 new commits.

Building application 'symfonydocs' (runtime type: php, tree: 1bdc1ee)
  Generating runtime configuration.
  
  Installing build dependencies...
    Installing python build dependencies: virtualenv
  
  Moving the application to the output directory
  Executing build hook...
    New python executable in /app/venv/bin/python
    Installing setuptools, pip, wheel...done.
    Downloading/unpacking git+https://github.com/fabpot/sphinx-php.git
      Cloning https://github.com/fabpot/sphinx-php.git to /tmp/pip-YPJzfO-build
      Running setup.py egg_info for package from git+https://github.com/fabpot/sphinx-php.git
        
    Downloading/unpacking Sphinx>=0.6 (from sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fe3%2F87%2Fe271f7f0d498c7fdaec009c27955401d18ef357c0d468e1eb2be36bdc68c%2FSphinx-1.5.2.tar.gz
      Running setup.py egg_info for package Sphinx
        
        warning: no files found matching 'sphinx/locale/.tx/config'
        no previously-included directories found matching 'doc/_build'
        no previously-included directories found matching 'sphinx/locale/.tx'
    Downloading/unpacking six>=1.5 (from Sphinx>=0.6->sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fb3%2Fb2%2F238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db%2Fsix-1.10.0.tar.gz
      Running setup.py egg_info for package six
        
        no previously-included directories found matching 'documentation/_build'
    Downloading/unpacking Jinja2>=2.3 (from Sphinx>=0.6->sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2Ff4%2F3f%2F28387a5bbc6883082c16784c6135440b94f9d5938fb156ff579798e18eda%2FJinja2-2.9.4.tar.gz
      Running setup.py egg_info for package Jinja2
        
        warning: no files found matching 'run-tests.py'
        warning: no files found matching '*' under directory 'custom_fixers'
        warning: no files found matching '*' under directory 'jinja2/testsuite/res'
        warning: no previously-included files matching '*' found under directory 'docs/_build'
        warning: no previously-included files matching '*.pyc' found under directory 'jinja2'
        warning: no previously-included files matching '*.pyc' found under directory 'docs'
        warning: no previously-included files matching '*.pyo' found under directory 'jinja2'
        warning: no previously-included files matching '*.pyo' found under directory 'docs'
    Downloading/unpacking Pygments>=2.0 (from Sphinx>=0.6->sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fb8%2F67%2Fab177979be1c81bc99c8d0592ef22d547e70bb4c6815c383286ed5dec504%2FPygments-2.1.3.tar.gz
      Running setup.py egg_info for package Pygments
        
    Downloading/unpacking docutils>=0.11 (from Sphinx>=0.6->sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2F05%2F25%2F7b5484aca5d46915493f1fd4ecb63c38c333bd32aa9ad6e19da8d08895ae%2Fdocutils-0.13.1.tar.gz
      Running setup.py egg_info for package docutils
        
        warning: no files found matching 'MANIFEST'
        warning: no previously-included files matching '*.pyc' found under directory '*'
        warning: no previously-included files matching '*~' found under directory '*'
        warning: no previously-included files matching '.DS_Store' found under directory '*'
    Downloading/unpacking snowballstemmer>=1.1 (from Sphinx>=0.6->sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2F20%2F6b%2Fd2a7cb176d4d664d94a6debf52cd8dbae1f7203c8e42426daa077051d59c%2Fsnowballstemmer-1.2.1.tar.gz
      Running setup.py egg_info for package snowballstemmer
        
        warning: no files found matching '*.py' under directory 'src'
    Downloading/unpacking babel>=1.3,!=2.0 (from Sphinx>=0.6->sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2F6e%2F96%2Fba2a2462ed25ca0e651fb7b66e7080f5315f91425a07ea5b34d7c870c114%2FBabel-2.3.4.tar.gz
      Running setup.py egg_info for package babel
        
        warning: no previously-included files matching '*' found under directory 'docs/_build'
        warning: no previously-included files matching '*.pyc' found under directory 'tests'
        warning: no previously-included files matching '*.pyo' found under directory 'tests'
    Downloading/unpacking alabaster>=0.7,<0.8 (from Sphinx>=0.6->sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2F71%2Fc3%2F70da7d8ac18a4f4c502887bd2549e05745fa403e2cd9d06a8a9910a762bc%2Falabaster-0.7.9.tar.gz
      Running setup.py egg_info for package alabaster
        
        warning: no files found matching 'README.md'
        warning: no previously-included files matching '.*.swp' found under directory 'alabaster'
    Downloading/unpacking imagesize (from Sphinx>=0.6->sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2F53%2F72%2F6c6f1e787d9cab2cc733cf042f125abec07209a58308831c9f292504e826%2Fimagesize-0.7.1.tar.gz
      Running setup.py egg_info for package imagesize
        
    Downloading/unpacking requests>=2.4.0 (from Sphinx>=0.6->sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fb6%2F61%2F7b374462d5b6b1d824977182db287758d549d8680444bad8d530195acba2%2Frequests-2.12.5.tar.gz
      Running setup.py egg_info for package requests
        
        warning: no files found matching 'test_requests.py'
    Downloading/unpacking MarkupSafe>=0.23 (from Jinja2>=2.3->Sphinx>=0.6->sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fc0%2F41%2Fbae1254e0396c0cc8cf1751cb7d9afc90a602353695af5952530482c963f%2FMarkupSafe-0.23.tar.gz
      Running setup.py egg_info for package MarkupSafe
        
    Downloading/unpacking pytz>=0a (from babel>=1.3,!=2.0->Sphinx>=0.6->sphinx-php==1.0)
      Using download cache from /mnt/cache/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2F42%2F00%2F5c89fc6c9b305df84def61863528e899e9dccb196f8438f6cbe960758fc5%2Fpytz-2016.10.tar.gz
      Running setup.py egg_info for package pytz
        
    Installing collected packages: Sphinx, sphinx-php, six, Jinja2, Pygments, docutils, snowballstemmer, babel, alabaster, imagesize, requests, MarkupSafe, pytz
      Running setup.py install for Sphinx
        
        warning: no files found matching 'sphinx/locale/.tx/config'
        no previously-included directories found matching 'doc/_build'
        no previously-included directories found matching 'sphinx/locale/.tx'
        Installing sphinx-apidoc script to /app/.global/bin
        Installing sphinx-build script to /app/.global/bin
        Installing sphinx-quickstart script to /app/.global/bin
        Installing sphinx-autogen script to /app/.global/bin
      Running setup.py install for sphinx-php
        
      Running setup.py install for six
        
        no previously-included directories found matching 'documentation/_build'
      Running setup.py install for Jinja2
        
        warning: no files found matching 'run-tests.py'
        warning: no files found matching '*' under directory 'custom_fixers'
        warning: no files found matching '*' under directory 'jinja2/testsuite/res'
        warning: no previously-included files matching '*' found under directory 'docs/_build'
        warning: no previously-included files matching '*.pyc' found under directory 'jinja2'
        warning: no previously-included files matching '*.pyc' found under directory 'docs'
        warning: no previously-included files matching '*.pyo' found under directory 'jinja2'
        warning: no previously-included files matching '*.pyo' found under directory 'docs'
        SyntaxError: ('invalid syntax', ('/app/.global/lib/python2.7/site-packages/jinja2/asyncfilters.py', 7, 9, 'async def auto_to_seq(value):\n'))
        
        SyntaxError: ('invalid syntax', ('/app/.global/lib/python2.7/site-packages/jinja2/asyncsupport.py', 22, 9, 'async def concat_async(async_gen):\n'))
        
      Running setup.py install for Pygments
        
        Installing pygmentize script to /app/.global/bin
      Running setup.py install for docutils
        changing mode of build/scripts-2.7/rst2html.py from 644 to 755
        changing mode of build/scripts-2.7/rst2html5.py from 644 to 755
        changing mode of build/scripts-2.7/rst2s5.py from 644 to 755
        changing mode of build/scripts-2.7/rst2latex.py from 644 to 755
        changing mode of build/scripts-2.7/rst2xetex.py from 644 to 755
        changing mode of build/scripts-2.7/rst2man.py from 644 to 755
    /bin/sh: 2: source: not found
    make: ../venv/bin/sphinx-build: Command not found
    make: *** [html] Error 127
        changing mode of build/scripts-2.7/rst2xml.py from 644 to 755
        changing mode of build/scripts-2.7/rst2pseudoxml.py from 644 to 755
        changing mode of build/scripts-2.7/rstpep2html.py from 644 to 755
        changing mode of build/scripts-2.7/rst2odt.py from 644 to 755
        changing mode of build/scripts-2.7/rst2odt_prepstyles.py from 644 to 755
        
        warning: no files found matching 'MANIFEST'
        warning: no previously-included files matching '*.pyc' found under directory '*'
        warning: no previously-included files matching '*~' found under directory '*'
        warning: no previously-included files matching '.DS_Store' found under directory '*'
        changing mode of /app/.global/bin/rst2xetex.py to 755
        changing mode of /app/.global/bin/rst2html.py to 755
        changing mode of /app/.global/bin/rst2odt.py to 755
        changing mode of /app/.global/bin/rst2odt_prepstyles.py to 755
        changing mode of /app/.global/bin/rst2html5.py to 755
        changing mode of /app/.global/bin/rst2pseudoxml.py to 755
        changing mode of /app/.global/bin/rst2s5.py to 755
        changing mode of /app/.global/bin/rst2xml.py to 755
        changing mode of /app/.global/bin/rstpep2html.py to 755
        changing mode of /app/.global/bin/rst2man.py to 755
        changing mode of /app/.global/bin/rst2latex.py to 755
      Running setup.py install for snowballstemmer
        
        warning: no files found matching '*.py' under directory 'src'
      Running setup.py install for babel
        
        warning: no previously-included files matching '*' found under directory 'docs/_build'
        warning: no previously-included files matching '*.pyc' found under directory 'tests'
        warning: no previously-included files matching '*.pyo' found under directory 'tests'
        Installing pybabel script to /app/.global/bin
      Running setup.py install for alabaster
        
        warning: no files found matching 'README.md'
        warning: no previously-included files matching '.*.swp' found under directory 'alabaster'
      Running setup.py install for imagesize
        
      Found existing installation: requests 2.5.2
        Uninstalling requests:
    Exception:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 104, in main
        status = self.run(options, args)
      File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 250, in run
        requirement_set.install(install_options, global_options)
      File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1129, in install
        requirement.uninstall(auto_confirm=True)
      File "/usr/lib/python2.7/dist-packages/pip/req.py", line 486, in uninstall
        paths_to_remove.remove(auto_confirm)
      File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1431, in remove
        renames(path, new_path)
      File "/usr/lib/python2.7/dist-packages/pip/util.py", line 263, in renames
        shutil.move(old, new)
      File "/usr/lib/python2.7/shutil.py", line 299, in move
        rmtree(src)
      File "/usr/lib/python2.7/shutil.py", line 252, in rmtree
        onerror(os.remove, fullname, sys.exc_info())
      File "/usr/lib/python2.7/shutil.py", line 250, in rmtree
        os.remove(fullname)
    OSError: [Errno 30] Read-only file system: '/usr/lib/pymodules/python2.7/requests/__init__.py'
    
    Storing complete log in /app/.pip/pip.log
    make: Entering directory `/app/_build'
    ../venv/bin/sphinx-build -b html -c . -d ./doctrees   ../ ./html
    make: Leaving directory `/app/_build'
  
  E: Error building project: The build hook failed with status code 2. Aborted build.

E: Error building the project: Unable to build project, aborting deployment.

@damz
Copy link
Contributor

damz commented Jan 22, 2017

This looks like it might be a pip bug. Can you try upgrading pip inside the virtualenv?

pip install --upgrade pip wheel

@javiereguiluz
Copy link
Member

@damz I'm not sure how to do that. Maybe @weaverryan or @Crell can help us here. Thanks!

@robfrawley
Copy link
Contributor Author

robfrawley commented Jan 22, 2017

@damz Thanks for that, it is definitely a pip bug and might be related to pypa/pip#1818. I've created my own platform.sh application where I am testing things so I can easily see the build output, instead of bugging @javiereguiluz every time I push new code.

If anyone wants to help, I'll add them to the test project so they can directly see the platform.sh build output and try committing fixes. Send me your e-mail if you want access and intend to assist.

I'll give your suggestion a try @damz; thanks!

@robfrawley
Copy link
Contributor Author

robfrawley commented Jan 22, 2017

Working with platform.sh support. I'll keep you guys updated when/if they happen on a resolution.

@robfrawley robfrawley force-pushed the bug-fix-platformsh-build branch from 21fbfef to 9fe53a5 Compare January 23, 2017 00:20
@robfrawley
Copy link
Contributor Author

robfrawley commented Jan 23, 2017

@javiereguiluz Fixed thanks to @damz and platform.sh support answers. I don't think we should pin everything, this is just my opinion, though. Platform.sh support crew turned out to be very helpful.

@robfrawley robfrawley force-pushed the bug-fix-platformsh-build branch 2 times, most recently from 843b677 to 24107fe Compare January 23, 2017 00:28
@robfrawley robfrawley changed the title [WIP] Fix Platform.sh Build Fix Platform.sh Build Jan 23, 2017
@robfrawley
Copy link
Contributor Author

@damz Not pinning everything shouldn't cause issues moving forward because of the use of virtualenv, right? Or am I wrong here?

@damz
Copy link
Contributor

damz commented Jan 23, 2017

@robfrawley Not pinning everything is bound to cause troubles similar to this one in the future. In my testing, I've seen that this project doesn't currently build with sphinx == 1.3.6 (which is the version that is currently specified), possibly because of a change in a third party library used by sphinx.

You would not do a PHP project without a composer.lock, you would not do a Python project without pinned dependencies.

@robfrawley
Copy link
Contributor Author

Newest additional commit updates .travis.yml to use requirements file, as well as build using make instead of explicitly calling the sphinx-build executable.

@robfrawley robfrawley force-pushed the bug-fix-platformsh-build branch from d36a9cd to 4940b3e Compare January 24, 2017 18:34
@@ -6,9 +6,9 @@ sudo: false
cache:
directories: [$HOME/.cache/pip]

install: pip install sphinx~=1.3.0 git+https://github.com/fabpot/sphinx-php.git
install: pip install -r _build/.requirements.txt sphinx==1.3.0
Copy link
Contributor Author

@robfrawley robfrawley Jan 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@javiereguiluz The requirement of 1.3.0 for TravisCI is due to the following warning (turned into error) that halts the build due to sphinx-php overwriting code-block using sphinx versions greater than 1.3:

Warning, treated as error:
WARNING: while setting up extension sensio.sphinx.codeblock: directive 'code-block' is already registered, it will be overridden

We may need to re-think the use of -nW opts for Travis runs, as this is incompatible with newer versions of Sphinx (which throw a warning on overridden directives), and this will become a problem at some point (as we begin to reply on newer features and need to run newer versions).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I've turned this comment into a proper issue (#7422) to not lose track of it.

@javiereguiluz
Copy link
Member

Let's close this because, fortunately, the build errors were fixed in another PR. Thanks!

weaverryan added a commit that referenced this pull request Jun 13, 2017
…frawley)

This PR was merged into the 2.7 branch.

Discussion
----------

Fix and align travis and platform build environments

This pull request fixes the `platform.sh` deploy and aligns the `platform.sh` and `travis-ci.org` build to use the same version constraints and environments. Per @xabbuh in #8009 (comment) this PR has been made against the `2.7` branch. Original implementation pulled from #8010 and #8009. Changes include:

- Update the `pip` version requirements pulled in by [_build/.requirements.txt](https://github.com/robfrawley/symfony-docs/blob/feature-align-travis-and-platform-build/_build/.requirements.txt) to latest releases, except for `sphinx` which must be downgraded to `1.3` until we find a solution for `sphinx-php` (which there doesn't seem to be much interest in fixing: #7402 (comment), #7422, fabpot/sphinx-php#33).

- Use the same package management and constraint requirements for both `platform.sh` and `travis-ci.org` by having both utilize the `_build/.requirements.txt` file when calling `pip`.

- Use the same documentation build command to compile the documentation HTML (`make`) while still calling `sphinx` with "strict mode" (or, more accurately, "turn warnings into errors mode") for `travis-ci.org`.

- On `platform.sh`, since the `vitrualenv` folder is at the documentation root, remove all `rst` files contained within it (pulled in from the `pip` packages) via a `find` command, so as to ensure the build doesn't pull them in (they would never appear in the output as they don't exist in the doctree, but if they contain errors or other inconsistencies, this could cause the build to fail while reading in their sources).
  - `find .virtualenv -type f -name "*.rst" -delete`

Commits
-------

764bc37 align travis and platform build environments
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.

3 participants