def testPythonSetupNonPure(self):
        try:
            __import__('setuptools')
        except __HOLE__:
            raise testhelp.SkipTestException('Missing python-setuptools package')
        recipestr = r"""
class Test(PackageRecipe):
    name = 'test'
    version = '0'
    clearBuildReqs()
    
    def setup(r):
        r.macros.lib = 'lib64'
        # test pre-existing python-specific multilib breakage
        r.Create('%(prefix)s/lib/python2.4/site-packages/a')
        r.Create('%(prefix)s/lib64/python2.4/site-packages/b')
        # test multilib breakage that purePython=False could help
        r.Create('setup.py', contents='\n'.join((
            '#import setuptools',
            'file("%(destdir)s%(prefix)s/lib/python2.4/site-packages/foo", "w").close()',
            'file("%(destdir)s%(prefix)s/lib64/python2.4/site-packages/bar", "w").close()',
            '')))
        r.PythonSetup()
"""
        # missing buildreq, but test that it runs anyway
        self.logFilter.add()
        self.assertRaises(policy.PolicyError, self.buildRecipe,
                          recipestr, "Test")
        self.logFilter.remove()
        assert(os.path.exists(util.joinPaths(self.buildDir,
               'test/_ROOT_/usr/lib/python2.4/site-packages/foo')))
        assert(os.path.exists(util.joinPaths(self.buildDir,
               'test/_ROOT_/usr/lib64/python2.4/site-packages/bar')))
        self.logFilter.regexpCompare([
            r'error: Python and object files detected in different directories before PythonSetup\(\) instance on line 18',
            r'error: Python and object files detected in different directories on line 18; call all instances of PythonSetup\(\) with the purePython=False argument',
            'error: NonMultilibComponent: .*',
            ])
dataset/ETHPy150Open sassoftware/conary/conary_test/cvctest/buildtest/buildtest.py/TestMakeFIFO.testPythonSetupNonPure