[pypy-issue] [issue1259] module __file__ attribute shows wrong path

David tracker at bugs.pypy.org
Tue Sep 11 11:40:22 CEST 2012


New submission from David <david.schneider at uni-duesseldorf.de>:

The __file__ attribute for some modules shows a path corresponding to the system 
where pypy was translated and not where it is running. 
This causes one of the module/math app-level tests that use this attribute to load 
the math_testcases.txt file to fail, if the test are run on a different machine as 
the one used for translation. 

Examples:
>>>> import math; math.__file__
'/Users/pypy/buildslave/pypy-c-jit-macosx-x86-64/build/pypy/module/math'
or 
>>>> import abc; abc.__file__
'/Users/pypy/buildslave/pypy-c-jit-macosx-x86-64/build/lib-python/2.7/abc.py'

In other cases, like ctypes, the behavior is as expected, e.g.:
>>>> import ctypes; ctypes.__file__
'/opt/pypy/lib-python/2.7/ctypes/__init__.pyc'

----------
messages: 4736
nosy: bivab, pypy-issue
priority: bug
status: unread
title: module __file__ attribute shows wrong path

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1259>
________________________________________


More information about the pypy-issue mailing list