guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PYTHONPATH anomaly


From: Hartmut Goebel
Subject: PYTHONPATH anomaly
Date: Sun, 4 Sep 2016 19:21:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

Hi,

Introduction:

today I kept struggling with obscure failing tests with a python
package: some of the test-files kept failing to import the very package,
while others succedes. It figured out that one of the test-files did
manipulate sys.path, so the test-files loaded earlier did raise the
import error and those loaded afterwards passed.

Trying to reproduce this in a venv, did not succeed. Say: the test pass.

As reason for this difference I discovered that in guix the current path
is not part of sys.path, while in the venv it is.

Questions:

1) Is it intended that the current dir is not part of sys.path?

2) Where is this patched into?

3) Why does this problem not occur when running "setup.py test"

4) Related: Shouldn't "build/lib" (resp. the related one for extension
packages) be preppended to sys.path? As this is where the build python
files are.


-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | address@hidden               |
| www.crazy-compilers.com | compilers which you thought are impossible |





reply via email to

[Prev in Thread] Current Thread [Next in Thread]