language: python
python:
  - "3.3"
  - "2.7"
before_install:
  - sudo locale-gen fr_FR.UTF-8
  - sudo mkdir -p /extra/pg/9.1/ts1 /extra/pg/9.1/ts2
  - sudo chown postgres:postgres /extra/pg/9.1/ts1 /extra/pg/9.1/ts2
  - sudo apt-get update -qq
  - sudo apt-get install -qq postgresql-plperl postgresql-plpython
before_script:
  - psql -Upostgres -c "CREATE TABLESPACE ts1 LOCATION '/extra/pg/9.1/ts1'"
  - psql -Upostgres -c "CREATE TABLESPACE ts2 LOCATION '/extra/pg/9.1/ts2'"
  - psql -Upostgres -c "CREATE LANGUAGE plpythonu"
  - psql postgres -c "DO $$import subprocess; plpy.info(subprocess.check_output(['localedef', '--list-archive']))$$ LANGUAGE plpythonu;"
script:
  - python setup.py test

language: python
python:
  - "3.3"
  - "2.7"
before_install:
  - sudo locale-gen fr_FR.UTF-8
  - sudo mkdir -p /extra/pg/9.1/ts1 /extra/pg/9.1/ts2
  - sudo chown postgres:postgres /extra/pg/9.1/ts1 /extra/pg/9.1/ts2
  - sudo apt-get update -qq
  - sudo apt-get install -qq postgresql-plperl postgresql-plpython
before_script:
  - psql -Upostgres -c "CREATE TABLESPACE ts1 LOCATION '/extra/pg/9.1/ts1'"
  - psql -Upostgres -c "CREATE TABLESPACE ts2 LOCATION '/extra/pg/9.1/ts2'"
  - psql -Upostgres -c "CREATE LANGUAGE plpythonu"
  - psql postgres -c "DO \$\$import subprocess; plpy.info(subprocess.check_output(['localedef', '--list-archive']))\$\$ LANGUAGE plpythonu;"
script:
  - python setup.py test

Use single quotes around PG command to avoid problems with $$ and the shell.
Use single quotes around PG command to avoid problems with $$ and the shell.
