I am trying to move my manylinux builds into travis. I am certainly a bit confused about how things are set up, but currently I am facing a specific error in the run_tests function. I had exactly the same issue with the amazon aws docker, but I was able to fix it there by exporting locale vars in the test script. Obviously I need to configure the test environment, but I am unsure where. The error messages seem to indicate that I don't have a locale file or something. I suppose the test could be skipped as well, but it ought to be possible to test in various locales.

config.sh: line 33: warning: setlocale: LC_CTYPE: cannot change locale 
(en_US.UTF-8): No such file or directory
config.sh: line 34: warning: setlocale: LC_NUMERIC: cannot change locale 
(en_US.UTF-8): No such file or directory
config.sh: line 35: warning: setlocale: LC_TIME: cannot change locale 
(en_US.UTF-8): No such file or directory
config.sh: line 36: warning: setlocale: LC_COLLATE: cannot change locale 
(en_US.UTF-8): No such file or directory
config.sh: line 38: warning: setlocale: LC_MESSAGES: cannot change locale 
(en_US.UTF-8): No such file or directory
===== in reportlab/tests pwd=/io/reportlab/tests
.................................................................................................................................E..........................................................................................................................s..s.....................
======================================================================
ERROR: testUtf8FileName (test_pdfbase_encodings.TextEncodingTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/io/reportlab/tests/test_pdfbase_encodings.py", line 94, in 
testUtf8FileName
    c.save()
  File "/venv/lib/python2.7/site-packages/reportlab/pdfgen/canvas.py", line 
1240, in save
    self._doc.SaveToFile(self._filename, self)
  File "/venv/lib/python2.7/site-packages/reportlab/pdfbase/pdfdoc.py", line 
214, in SaveToFile
    f = open(filename, "wb")
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 
52: ordinal not in range(128)

My config.sh looks like
###############################################################################
# Define custom utilities
#see https://github.com/python-pillow/pillow-wheels/blob/master/config.sh

# Package versions for fresh source builds
FREETYPE_VERSION=2.9.1
#LIBPNG_VERSION=1.6.32
ZLIB_VERSION=1.2.11
#JPEG_VERSION=9c
#OPENJPEG_VERSION=2.1
#TIFF_VERSION=4.0.9
#LCMS2_VERSION=2.9
#LIBWEBP_VERSION=1.0.0

function pre_build {
        if [ -n "$IS_OSX" ]; then
                # Update to latest zlib for OSX build
                build_new_zlib
        fi
        if [ -n "$IS_OSX" ]; then
                # Custom freetype build
                local ft_name_ver=freetype-${FREETYPE_VERSION}
                fetch_unpack 
http://download.savannah.gnu.org/releases/freetype/${ft_name_ver}.tar.gz
                (cd $ft_name_ver \
                        && ./configure --prefix=$BUILD_PREFIX 
"--with-harfbuzz=no" \
                        && make && make install)
        else
                build_freetype
        fi
}
function run_tests {
        export LANG="en_US.UTF-8"
        export LANGUAGE="en_US:en"
        export LC_CTYPE="en_US.UTF-8"
        export LC_NUMERIC="en_US.UTF-8"
        export LC_TIME="en_US.UTF-8"
        export LC_COLLATE="en_US.UTF-8"
        export LC_MONETARY="en_US.UTF-8"
        export LC_MESSAGES="en_US.UTF-8"
        export LC_PAPER="en_US.UTF-8"
        export LC_NAME="en_US.UTF-8"
        export LC_ADDRESS="en_US.UTF-8"
        export LC_TELEPHONE="en_US.UTF-8"
        export LC_MEASUREMENT="en_US.UTF-8"
        export LC_IDENTIFICATION="en_US.UTF-8"
        export LC_ALL=""
        (
        cd ../reportlab/tests
        echo "===== in reportlab/tests pwd=`pwd`"
        python runAll.py
        )
        }
###############################################################################
--
Robin Becker
_______________________________________________
Wheel-builders mailing list
Wheel-builders@python.org
https://mail.python.org/mailman/listinfo/wheel-builders

Reply via email to