jlec 15/06/02 08:23:14 Added: cffi-1.1.0-test-backport.patch Log: Backport patch for test failure (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key E9402A79B03529A2!)
Revision Changes Path 1.1 dev-python/cffi/files/cffi-1.1.0-test-backport.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/cffi/files/cffi-1.1.0-test-backport.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/cffi/files/cffi-1.1.0-test-backport.patch?rev=1.1&content-type=text/plain Index: cffi-1.1.0-test-backport.patch =================================================================== # HG changeset patch # User Armin Rigo <ar...@tunes.org> # Date 1433182838 -7200 # Node ID 34d5fd98bc84d202dd6692906f21509bb5abefaf # Parent feea0af4a450e0ff0045f1b7c0a5f430c97520f9 Issue #204: second try diff --git a/testing/cffi1/test_zdist.py b/testing/cffi1/test_zdist.py --- a/testing/cffi1/test_zdist.py +++ b/testing/cffi1/test_zdist.py @@ -29,13 +29,17 @@ if hasattr(self, 'saved_cwd'): os.chdir(self.saved_cwd) - def run(self, args): + def run(self, args, cwd=None): env = os.environ.copy() - newpath = self.rootdir - if 'PYTHONPATH' in env: - newpath += os.pathsep + env['PYTHONPATH'] - env['PYTHONPATH'] = newpath - subprocess.check_call([self.executable] + args, env=env) + # a horrible hack to prevent distutils from finding ~/.pydistutils.cfg + # (there is the --no-user-cfg option, but not in Python 2.6...) + env['HOME'] = '/this/path/does/not/exist' + if cwd is None: + newpath = self.rootdir + if 'PYTHONPATH' in env: + newpath += os.pathsep + env['PYTHONPATH'] + env['PYTHONPATH'] = newpath + subprocess.check_call([self.executable] + args, cwd=cwd, env=env) def _prepare_setuptools(self): if hasattr(TestDist, '_setuptools_ready'): @@ -44,8 +48,7 @@ import setuptools except ImportError: py.test.skip("setuptools not found") - subprocess.check_call([self.executable, 'setup.py', 'egg_info'], - cwd=self.rootdir) + self.run(['setup.py', 'egg_info'], cwd=self.rootdir) TestDist._setuptools_ready = True def check_produced_files(self, content, curdir=None):