Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 571172

Summary: dev-python/virtualenv sets bad PYTHONPATH with dev-lang/python:3.5
Product: Gentoo Linux Reporter: Colin MacLean <cmaclean>
Component: Current packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED FIXED    
Severity: major CC: jlec
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch to fix virtualenv's PYTHONPATH
Updated ebuild to include patch

Description Colin MacLean 2016-01-07 15:57:12 UTC
Created attachment 422198 [details, diff]
Patch to fix virtualenv's PYTHONPATH

If running virtualenv with default Python other than python3.5 and using the -p python3.5 option, the default Python's site-packages ends up in the PYTHONPATH. If there are packages which are not compatible with python3.5, this causes virtualenv to break. See https://github.com/pypa/virtualenv/issues/763. I have backported the commit which fixes this bug.
Comment 1 Colin MacLean 2016-01-07 15:57:57 UTC
Created attachment 422200 [details]
Updated ebuild to include patch
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2016-01-11 08:04:49 UTC
(In reply to Colin MacLean from comment #0)
> Created attachment 422198 [details, diff] [details, diff]
> Patch to fix virtualenv's PYTHONPATH
> 

Is this an official upstream commit?
Comment 3 Colin MacLean 2016-01-15 21:29:00 UTC
(In reply to Justin Lecher from comment #2)
> (In reply to Colin MacLean from comment #0)
> > Created attachment 422198 [details, diff] [details, diff] [details, diff]
> > Patch to fix virtualenv's PYTHONPATH
> > 
> 
> Is this an official upstream commit?

The exact upstream commit, https://github.com/pypa/virtualenv/pull/805/files, didn't apply successfully to version 13.1.2. The code of the patch itself is the same, but there were some offsets and one of the imports changed between 13.1.2 and HEAD in the patch's context lines.
Comment 4 Justin Lecher (RETIRED) gentoo-dev 2016-01-17 15:23:54 UTC
commit e0b3f694ceda2d7220431ee7b27011877bbd3230
Author: Justin Lecher <jlec@gentoo.org>
Date:   Sun Jan 17 16:23:04 2016 +0100

    dev-python/virtualenv: Backport fix for python3.5

    Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=571172

    Package-Manager: portage-2.2.26
    Signed-off-by: Justin Lecher <jlec@gentoo.org>

    https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0b3f694ceda2d7220431ee7b27011877bbd3230
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2016-01-17 19:44:53 UTC
commit e0b3f694ceda2d7220431ee7b27011877bbd3230
Author: Justin Lecher <jlec@gentoo.org>
Date:   Sun Jan 17 16:23:04 2016 +0100

    dev-python/virtualenv: Backport fix for python3.5

    Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=571172

    Package-Manager: portage-2.2.26
    Signed-off-by: Justin Lecher <jlec@gentoo.org>

    https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0b3f694ceda2d7220431ee7b27011877bbd3230