hashdist/hashstack — pull request #533 by certik (2014-12-03 00:38:21+00:00)
Title: Add Support for Python 3

Fixes #532.

Just change the `pyver` variable in `common.yaml` to anything from: 2.7, 3.2, 3.3, 3.4. The correct Python will automatically be built. Nothing changed for Python 2.7, except the code for the HTTPS test was improved so that it works both in Python 2 and Python 3, so Python 2.7 also gets rebuilt after this PR is merged due to this.

I tested it with the following profile:
```
extends:
- file: linux.yaml

packages:

launcher:
blas:
use: lapack
lapack:
use: lapack
python:
host: false
build_with: |
bzip2, openssl, sqlite
link: shared
nose:
```
All versions work great, except for 3.4 I get:
```
[profile] Building profile/mfg47boc3swp, follow log with:
[profile] tail -f /local/certik/tmp/profile-mfg47boc3swp/build.log
[profile] running ['hit', 'create-links', u'/local/certik/tmp/profile-mfg47boc3swp/job/10_in0.json']
[ERROR] [Errno 13] Permission denied in silent_relative_symlink('/local/certik/bld/setuptools/ph6mzshvbojw/lib/python3.4/site-packages/setuptools/tests/__pycache__/test_find_packages.cpython-34.pyc', u'/local/certik/bld/profile/mfg47boc3swp/lib/python3.4/site-packages/setuptools/tests/__pycache__/test_find_packages.cpython-34.pyc')
[profile|ERROR] hit command failed: [Errno 13] [Errno 13] Permission denied in silent_relative_symlink('/local/certik/bld/setuptools/ph6mzshvbojw/lib/python3.4/site-packages/setuptools/tests/__pycache__/test_find_packages.cpython-34.pyc', u'/local/certik/bld/profile/mfg47boc3swp/lib/python3.4/site-packages/setuptools/tests/__pycache__/test_find_packages.cpython-34.pyc')
```
Some packages don't work with Python 3 yet. For example if I add `cython` and use let's say Python 3.3, I get:
```
[profile] Building profile/zsi4a2jfkima, follow log with:
[profile] tail -f /local/certik/tmp/profile-zsi4a2jfkima/build.log
[profile] running ['hit', 'create-links', u'/local/certik/tmp/profile-zsi4a2jfkima/job/12_in0.json']
[ERROR] [Errno 13] Permission denied in silent_relative_symlink('/local/certik/bld/setuptools/pkcdekeqpmkp/lib/python3.3/site-packages/__pycache__/easy_install.cpython-33.pyc', u'/local/certik/bld/profile/zsi4a2jfkima/lib/python3.3/site-packages/__pycache__/easy_install.cpython-33.pyc')
[profile|ERROR] hit command failed: [Errno 13] [Errno 13] Permission denied in silent_relative_symlink('/local/certik/bld/setuptools/pkcdekeqpmkp/lib/python3.3/site-packages/__pycache__/easy_install.cpython-33.pyc', u'/local/certik/bld/profile/zsi4a2jfkima/lib/python3.3/site-packages/__pycache__/easy_install.cpython-33.pyc')
```
It looks like something is not quite right with setuptools in Python 3. But `nose` uses setuptools and it works great in Python 3.3, so it only gets triggered sometimes.

/cc @ahmadia, @cekees.