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

Bug 486736

Summary: >=dev-python/cffi-0.7.2 test phase tries to install dependencies itself and fails hard
Product: Gentoo Linux Reporter: Patrick Lauer <patrick>
Component: New packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED FIXED    
Severity: normal CC: tka
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=489870
Whiteboard:
Package list:
Runtime testing required: ---

Description Patrick Lauer gentoo-dev 2013-10-02 00:53:37 UTC
Random installation of pip, virtualenv:



testing/test_zintegration.py:75: test_infrastructure FAILED

================================================================================================================================== FAILURES ===================================================================================================================================
_____________________________________________________________________________________________________________________________ test_infrastructure _____________________________________________________________________________________________________________________________

    def test_infrastructure():
        run_setup_and_program('infrastructure', '''
        import snip_infrastructure
        assert snip_infrastructure.func() == 42
>       ''')

testing/test_zintegration.py:79: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

dirname = 'infrastructure', python_snippet = '\n    import snip_infrastructure\n    assert snip_infrastructure.func() == 42\n    '

    def run_setup_and_program(dirname, python_snippet):
>       venv_dir = create_venv(dirname + '-cpy')

testing/test_zintegration.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

name = 'infrastructure-cpy'

    def create_venv(name):
        tmpdir = udir.join(name)
        try:
            subprocess.check_call(['virtualenv', '--distribute',
                                   '-p', os.path.abspath(sys.executable),
                                   str(tmpdir)])
        except OSError as e:
            py.test.skip("Cannot execute virtualenv: %s" % (e,))
    
        site_packages = None
        for dirpath, dirnames, filenames in os.walk(str(tmpdir)):
            if os.path.basename(dirpath) == 'site-packages':
                site_packages = dirpath
                break
        if site_packages:
            try:
                from cffi import _pycparser
                modules = ('cffi', '_cffi_backend')
            except ImportError:
                modules = ('cffi', '_cffi_backend', 'pycparser')
                try:
                    import ply
                except ImportError:
                    pass
                else:
                    modules += ('ply',)   # needed for older versions of pycparser
            for module in modules:
                target = imp.find_module(module)[1]
                os.symlink(target, os.path.join(site_packages,
>                                               os.path.basename(target)))
E               OSError: [Errno 17] File exists

testing/test_zintegration.py:35: OSError
------------------------------------------------------------------------------------------------------------------------------- Captured stdout -------------------------------------------------------------------------------------------------------------------------------
Already using interpreter /usr/bin/python3.2
New python executable in /var/tmp/portage/dev-python/cffi-0.7.2/temp/python3.2/ffi-0/infrastructure-cpy/bin/python3.2
Also creating executable in /var/tmp/portage/dev-python/cffi-0.7.2/temp/python3.2/ffi-0/infrastructure-cpy/bin/python
Please make sure you remove any previous custom paths from your /var/tmp/portage/dev-python/cffi-0.7.2/temp/python3.2/home/.pydistutils.cfg file.
Installing Setuptools.................................................................................................................................................................................done.
Installing Pip...............................................................................................................................................................................................................................................done.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================================================= 1 failed, 970 passed, 50 skipped in 127.40 seconds ==============================================================================================================
Comment 1 Dirkjan Ochtman (RETIRED) gentoo-dev 2013-10-02 06:23:51 UTC
Can't reproduce. Please to troubleshoot more?
Comment 2 Patrick Lauer gentoo-dev 2013-11-26 05:56:07 UTC
I can reliably trigger it. Possibly related to the set of installed packages?
Comment 3 Mike Gilbert gentoo-dev 2013-11-30 04:06:56 UTC
+  30 Nov 2013; Mike Gilbert <floppym@gentoo.org> cffi-0.7.2.ebuild,
+  cffi-0.8.ebuild:
+  Skip test_integration.py to avoid bugs 486736 and 489870.
+

Not really fixed, but not quite as broken. If someone else wants to mess with it, feel free.
Comment 4 Mike Gilbert gentoo-dev 2013-11-30 04:07:10 UTC
*** Bug 489870 has been marked as a duplicate of this bug. ***