ArjenSchwarz / wercker-step-hugo-build

Wercker Step for building Hugo sites
45 stars 19 forks source link

Build fails due to pygments issue #32

Closed Jos512 closed 7 years ago

Jos512 commented 7 years ago

I've configured wercker like this:

box: wercker/default
build:
  steps:
    - arjen/hugo-build:
        version: "0.18"
        theme: lanyon
        flags: --buildDrafts=false

Now I do not use Pygments in my website. However, the build fails due to a problem with that package:

cd $WERCKER_SOURCE_DIR
$ export WERCKER_STEP_ROOT="/wercker/steps/arjen/hugo-build/1.14.1"
$ export WERCKER_STEP_ID="0059d518-7f46-403f-b6ac-c37f9e80396e"
$ export WERCKER_STEP_NAME="hugo-build"
$ export WERCKER_REPORT_NUMBERS_FILE="$WERCKER_REPORT_DIR/$WERCKER_STEP_ID/numbers.ini"
$ export WERCKER_REPORT_MESSAGE_FILE="$WERCKER_REPORT_DIR/$WERCKER_STEP_ID/message.txt"
$ export WERCKER_REPORT_ARTIFACTS_DIR="$WERCKER_REPORT_DIR/$WERCKER_STEP_ID/artifacts"
$ mkdir -p $WERCKER_REPORT_ARTIFACTS_DIR
$ export WERCKER_STEP_TEMP="/tmp/$WERCKER_STEP_ID"
$ source '/wercker/wercker-build-essentials/init.sh'
$ mkdir -p $WERCKER_STEP_TEMP
$ export WERCKER_HUGO_BUILD_VERSION="0.18"
$ export WERCKER_HUGO_BUILD_THEME="lanyon"
$ export WERCKER_HUGO_BUILD_FLAGS="--buildDrafts=false"
$ export WERCKER_HUGO_BUILD_DISABLE_PYGMENTS="false"
$ export WERCKER_HUGO_BUILD_FORCE_INSTALL="false"
$ export WERCKER_HUGO_BUILD_PROD_BRANCHES=""
$ export WERCKER_HUGO_BUILD_DEV_BRANCHES=""
$ export WERCKER_HUGO_BUILD_DEV_FLAGS=""
$ export WERCKER_HUGO_BUILD_BASEDIR=""
$ export WERCKER_HUGO_BUILD_CONFIG=""
$ source "$WERCKER_STEP_ROOT/run.sh"
Downloading/unpacking Pygments
Downloading Pygments-2.1.3.tar.gz (2.1MB): 2.1MB downloaded
Running setup.py egg_info for package Pygments

Installing collected packages: Pygments
Running setup.py install for Pygments

error: could not create '/usr/local/lib/python2.7/dist-packages/pygments': Permission denied
Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-ubuntu/Pygments/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-HBHKHq-record/install-record.txt --single-version-externally-managed:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/pygments
copying pygments/filter.py -> build/lib.linux-x86_64-2.7/pygments
copying pygments/modeline.py -> build/lib.linux-x86_64-2.7/pygments
copying pygments/sphinxext.py -> build/lib.linux-x86_64-2.7/pygments
copying pygments/style.py -> build/lib.linux-x86_64-2.7/pygments
copying pygments/console.py -> build/lib.linux-x86_64-2.7/pygments
copying pygments/plugin.py -> build/lib.linux-x86_64-2.7/pygments
copying pygments/cmdline.py -> build/lib.linux-x86_64-2.7/pygments
copying pygments/formatter.py -> build/lib.linux-x86_64-2.7/pygments
copying pygments/token.py -> build/lib.linux-x86_64-2.7/pygments
copying pygments/unistring.py -> build/lib.linux-x86_64-2.7/pygments
copying pygments/util.py -> build/lib.linux-x86_64-2.7/pygments
copying pygments/lexer.py -> build/lib.linux-x86_64-2.7/pygments
copying pygments/regexopt.py -> build/lib.linux-x86_64-2.7/pygments
copying pygments/__init__.py -> build/lib.linux-x86_64-2.7/pygments
copying pygments/scanner.py -> build/lib.linux-x86_64-2.7/pygments
creating build/lib.linux-x86_64-2.7/pygments/filters
copying pygments/filters/__init__.py -> build/lib.linux-x86_64-2.7/pygments/filters
creating build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/ooc.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/tcl.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/dotnet.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/c_like.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/roboconf.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/markup.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/dylan.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/supercollider.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/algebra.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/php.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/_lua_builtins.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/j.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/textedit.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/praat.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/int_fiction.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/robotframework.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/grammar_notation.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/_lasso_builtins.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/webmisc.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/shell.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/theorem.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/c_cpp.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/ezhil.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/oberon.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/urbi.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/eiffel.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/agile.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/data.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/_vim_builtins.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/html.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/pascal.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/ruby.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/perl.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/console.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/_openedge_builtins.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/business.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/chapel.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/make.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/parsers.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/archetype.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/esoteric.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/dsls.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/_cl_builtins.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/compiled.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/_mapping.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/dalvik.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/trafficscript.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/javascript.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/_stan_builtins.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/installers.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/r.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/apl.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/d.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/foxpro.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/templates.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/nimrod.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/python.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/_postgres_builtins.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/pawn.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/configs.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/igor.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/idl.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/_sourcemod_builtins.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/factor.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/basic.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/qvt.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/modula2.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/prolog.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/special.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/elm.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/rust.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/csound.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/asm.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/go.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/math.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/matlab.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/hexdump.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/iolang.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/graph.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/_mql_builtins.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/erlang.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/objective.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/functional.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/automation.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/haskell.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/ecl.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/haxe.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/felix.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/scripting.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/testing.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/rebol.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/actionscript.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/smalltalk.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/_scilab_builtins.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/nix.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/textfmts.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/fortran.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/snobol.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/ambient.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/nit.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/web.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/resource.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/rdf.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/jvm.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/x10.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/fantom.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/_cocoa_builtins.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/inferno.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/other.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/diff.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/text.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/graphics.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/_php_builtins.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/css.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/sql.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/_asy_builtins.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/parasail.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/modeling.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/hdl.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/lisp.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/julia.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/ml.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/_csound_builtins.py -> build/lib.linux-x86_64-2.7/pygments/lexers
copying pygments/lexers/__init__.py -> build/lib.linux-x86_64-2.7/pygments/lexers
creating build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/friendly.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/paraiso_light.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/rrt.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/pastie.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/trac.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/xcode.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/emacs.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/autumn.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/borland.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/algol_nu.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/paraiso_dark.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/vim.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/algol.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/igor.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/native.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/lovelace.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/arduino.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/colorful.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/tango.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/murphy.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/manni.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/monokai.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/perldoc.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/bw.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/default.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/vs.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/fruity.py -> build/lib.linux-x86_64-2.7/pygments/styles
copying pygments/styles/__init__.py -> build/lib.linux-x86_64-2.7/pygments/styles
creating build/lib.linux-x86_64-2.7/pygments/formatters
copying pygments/formatters/rtf.py -> build/lib.linux-x86_64-2.7/pygments/formatters
copying pygments/formatters/html.py -> build/lib.linux-x86_64-2.7/pygments/formatters
copying pygments/formatters/img.py -> build/lib.linux-x86_64-2.7/pygments/formatters
copying pygments/formatters/terminal256.py -> build/lib.linux-x86_64-2.7/pygmentsformatters
copying pygments/formatters/_mapping.py -> build/lib.linux-x86_64-2.7/pygments/formatters
copying pygments/formatters/svg.py -> build/lib.linux-x86_64-2.7/pygments/formatters
copying pygments/formatters/bbcode.py -> build/lib.linux-x86_64-2.7/pygments/formatters
copying pygments/formatters/latex.py -> build/lib.linux-x86_64-2.7/pygments/formatters
copying pygments/formatters/terminal.py -> build/lib.linux-x86_64-2.7/pygments/formatters
copying pygments/formatters/other.py -> build/lib.linux-x86_64-2.7/pygments/formatters
copying pygments/formatters/irc.py -> build/lib.linux-x86_64-2.7/pygments/formatters
copying pygments/formatters/__init__.py -> build/lib.linux-x86_64-2.7/pygments/formatters
running egg_info
writing Pygments.egg-info/PKG-INFO
writing top-level names to Pygments.egg-info/top_level.txt
writing dependency_links to Pygments.egg-info/dependency_links.txt
writing entry points to Pygments.egg-info/entry_points.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'Pygments.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'Pygments.egg-info/SOURCES.txt'
running install_lib
creating /usr/local/lib/python2.7/dist-packages/pygments
error: could not create '/usr/local/lib/python2.7/dist-packages/pygments': Permission denied
----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-ubuntu/Pygments/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-HBHKHq-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build-ubuntu/Pygments
Storing complete log in /home/ubuntu/.pip/pip.log

The same problem also happens when downgrading to 0.17:

box: wercker/default
build:
  steps:
    - arjen/hugo-build:
        version: "0.17"
        theme: lanyon
        flags: --buildDrafts=false
ArjenSchwarz commented 7 years ago

Hi @Jos512, thanks for letting me know. It seems that I didn't take the old Wercker configuration into account when I made some recent changes to how Pygments is installed. My apologies, I'll release a fix soon. In the meantime what you can do is to add disable_pygments: true below the flags you already have. This will ensure it skips the pygments installation completely and allow your build to succeed.

Also, just for your information, Hugo released a 0.18.1 bugfix release. It is unrelated to the issue you're having here, but you might want to use it anyway.

Jos512 commented 7 years ago

Thanks @ArjenSchwarz , for the quick response and information. With that flag the deploy works.

Thanks for thinking along, I'm already using 0.18.1. :smile:

ArjenSchwarz commented 7 years ago

A couple of days after this was reported, Wercker started sending out emails that they'll be closing down the old stacks soon and that everyone should migrate to the Docker configuration. Because of that, I've decided I'm not going to spend time on fixing this when nobody will be able to actually use that fix.