LoginSignup
3
3

More than 5 years have passed since last update.

CircleCIでsitecustomize.pyを設定する。

Posted at

sys.getdefaultencoding() != 'ascii'なプロダクトの場合、sitecustomize.pyが要る。

sitecustomize.py.cirlceci
# -*- coding: utf-8 -*-
import sys
sys.setdefaultencoding('utf-8')
circle.yml
dependencies:
  pre:
    - cp circleci/sitecustomize.py venv/lib/python2.7/sitecustomize.py

こんな感じ。

ずっとvenv/lib/python2.7/site-packagesにコピーしてて動かなくて泣きべそかいてた。これだと、CircleCIはDebian系なので/usr/lib/python2.7/sitecustomize.pyにファイルがあってそっちが優先されてしまう。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3