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
Show 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):
...
@@ -1057,14 +1057,14 @@ class EndToEndTest(unittest.TestCase):
self.treefile = treefile
self.treefile = treefile
self.workdir = os.path.join(workdir, self.name)
self.workdir = os.path.join(workdir, self.name)
self.cleanup_workdir = cleanup_workdir
self.cleanup_workdir = cleanup_workdir
cython_syspath =
self.cython_root
cython_syspath =
[self.cython_root]
for path in sys.path
[::-1]
:
for path in sys.path:
if path.startswith(self.cython_root):
if path.startswith(self.cython_root)
and path not in cython_syspath
:
# Py3 installation and refnanny build prepend their
# Py3 installation and refnanny build prepend their
# fixed paths to sys.path => prefer that over the
# fixed paths to sys.path => prefer that over the
# generic one
# generic one
(cython_root itself goes last)
cython_syspath
= path + os.pathsep + cython_syspath
cython_syspath
.append(path)
self.cython_syspath =
cython_syspath
self.cython_syspath =
os.pathsep.join(cython_syspath[::-1])
unittest.TestCase.__init__(self)
unittest.TestCase.__init__(self)
def shortDescription(self):
def shortDescription(self):
...
@@ -1100,9 +1100,9 @@ class EndToEndTest(unittest.TestCase):
...
@@ -1100,9 +1100,9 @@ class EndToEndTest(unittest.TestCase):
commands = (self.commands
commands = (self.commands
.replace("
CYTHON
", "
PYTHON
%
s
" % os.path.join(self.cython_root, 'cython.py'))
.replace("
CYTHON
", "
PYTHON
%
s
" % os.path.join(self.cython_root, 'cython.py'))
.replace("
PYTHON
", sys.executable))
.replace("
PYTHON
", sys.executable))
try:
old_path = os.environ.get('PYTHONPATH')
old_path = os.environ.get('PYTHONPATH')
os.environ['PYTHONPATH'] = self.cython_syspath + os.pathsep + os.path.join(self.cython_syspath, (old_path or ''))
os.environ['PYTHONPATH'] = self.cython_syspath + os.pathsep + (old_path or '')
try:
for command in commands.split('
\
n
'):
for command in commands.split('
\
n
'):
p = subprocess.Popen(commands,
p = subprocess.Popen(commands,
stderr=subprocess.PIPE,
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