Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
64574318
Commit
64574318
authored
Aug 31, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix PYTHONPATH handling for end-to-end tests
parent
2764fcdc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
runtests.py
runtests.py
+8
-8
No files found.
runtests.py
View file @
64574318
...
...
@@ -1057,14 +1057,14 @@ class EndToEndTest(unittest.TestCase):
self.treefile = treefile
self.workdir = os.path.join(workdir, self.name)
self.cleanup_workdir = cleanup_workdir
cython_syspath =
self.cython_root
for path in sys.path
[::-1]
:
if path.startswith(self.cython_root):
cython_syspath =
[self.cython_root]
for path in sys.path:
if path.startswith(self.cython_root)
and path not in cython_syspath
:
# Py3 installation and refnanny build prepend their
# fixed paths to sys.path => prefer that over the
# generic one
cython_syspath
= path + os.pathsep + cython_syspath
self.cython_syspath =
cython_syspath
# generic one
(cython_root itself goes last)
cython_syspath
.append(path)
self.cython_syspath =
os.pathsep.join(cython_syspath[::-1])
unittest.TestCase.__init__(self)
def shortDescription(self):
...
...
@@ -1100,9 +1100,9 @@ class EndToEndTest(unittest.TestCase):
commands = (self.commands
.replace("
CYTHON
", "
PYTHON
%
s
" % os.path.join(self.cython_root, 'cython.py'))
.replace("
PYTHON
", sys.executable))
old_path = os.environ.get('PYTHONPATH')
os.environ['PYTHONPATH'] = self.cython_syspath + os.pathsep + (old_path or '')
try:
old_path = os.environ.get('PYTHONPATH')
os.environ['PYTHONPATH'] = self.cython_syspath + os.pathsep + os.path.join(self.cython_syspath, (old_path or ''))
for command in commands.split('
\
n
'):
p = subprocess.Popen(commands,
stderr=subprocess.PIPE,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment