1 |
jlec 15/06/02 08:23:14 |
2 |
|
3 |
Added: cffi-1.1.0-test-backport.patch |
4 |
Log: |
5 |
Backport patch for test failure |
6 |
|
7 |
(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key E9402A79B03529A2!) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-python/cffi/files/cffi-1.1.0-test-backport.patch |
11 |
|
12 |
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 |
13 |
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 |
14 |
|
15 |
Index: cffi-1.1.0-test-backport.patch |
16 |
=================================================================== |
17 |
# HG changeset patch |
18 |
# User Armin Rigo <arigo@×××××.org> |
19 |
# Date 1433182838 -7200 |
20 |
# Node ID 34d5fd98bc84d202dd6692906f21509bb5abefaf |
21 |
# Parent feea0af4a450e0ff0045f1b7c0a5f430c97520f9 |
22 |
Issue #204: second try |
23 |
|
24 |
diff --git a/testing/cffi1/test_zdist.py b/testing/cffi1/test_zdist.py |
25 |
--- a/testing/cffi1/test_zdist.py |
26 |
+++ b/testing/cffi1/test_zdist.py |
27 |
@@ -29,13 +29,17 @@ |
28 |
if hasattr(self, 'saved_cwd'): |
29 |
os.chdir(self.saved_cwd) |
30 |
|
31 |
- def run(self, args): |
32 |
+ def run(self, args, cwd=None): |
33 |
env = os.environ.copy() |
34 |
- newpath = self.rootdir |
35 |
- if 'PYTHONPATH' in env: |
36 |
- newpath += os.pathsep + env['PYTHONPATH'] |
37 |
- env['PYTHONPATH'] = newpath |
38 |
- subprocess.check_call([self.executable] + args, env=env) |
39 |
+ # a horrible hack to prevent distutils from finding ~/.pydistutils.cfg |
40 |
+ # (there is the --no-user-cfg option, but not in Python 2.6...) |
41 |
+ env['HOME'] = '/this/path/does/not/exist' |
42 |
+ if cwd is None: |
43 |
+ newpath = self.rootdir |
44 |
+ if 'PYTHONPATH' in env: |
45 |
+ newpath += os.pathsep + env['PYTHONPATH'] |
46 |
+ env['PYTHONPATH'] = newpath |
47 |
+ subprocess.check_call([self.executable] + args, cwd=cwd, env=env) |
48 |
|
49 |
def _prepare_setuptools(self): |
50 |
if hasattr(TestDist, '_setuptools_ready'): |
51 |
@@ -44,8 +48,7 @@ |
52 |
import setuptools |
53 |
except ImportError: |
54 |
py.test.skip("setuptools not found") |
55 |
- subprocess.check_call([self.executable, 'setup.py', 'egg_info'], |
56 |
- cwd=self.rootdir) |
57 |
+ self.run(['setup.py', 'egg_info'], cwd=self.rootdir) |
58 |
TestDist._setuptools_ready = True |
59 |
|
60 |
def check_produced_files(self, content, curdir=None): |