Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_python_module tests failing due to missing PYTHON environment variable #180

Open
jengelh opened this issue Feb 13, 2023 · 4 comments
Open

Comments

@jengelh
Copy link

jengelh commented Feb 13, 2023

$ ./configure --disable-static --disable-rpath --enable-wide-character-type --enable-python PYTHON_VERSION=3.8
[...]
$ grep ^PYTHON.= Makefile
PYTHON = python3.8

Within libewf-20230212, make itself knows the right Python interpreter. However, this make variable is not exported. As a result, when make check invokes test_python_module.sh, the environment has no PYTHON set, and test_python_modules.sh then defaults to usr /usr/bin/python. In my case, /usr/bin/python is a different Python version (2.7) and refuses to load the just-built pyewf.so.

If I add export PYTHON to tests/Makefile.am, the check job succeeds with no failures.

@joachimmetz joachimmetz changed the title tests/Makefile.am: export PYTHON test_python_module tests failing due to missing PYTHON environment variable Feb 14, 2023
@joachimmetz
Copy link
Member

Why is the PYTHON environment variable not already set in your environment? What shell, operating system and distribution (including versions) are you using?

@jengelh
Copy link
Author

jengelh commented Feb 14, 2023

Nothing in the openSUSE Tumbleweed x86_64 20230210 distribution sets this environment variable upon login.
Nor is it set in a Debian bookmark x32 20230210 chroot upon chroot+bash --login.
Even if $PYTHON was generally set, the python version used during the libewf build may be different (e.g. 3.8 vs 3.10).

@jengelh
Copy link
Author

jengelh commented Feb 14, 2023

The debian-live-11.6.0-amd64-xfce.iso also does not set $PYTHON in the default shell.

@joachimmetz
Copy link
Member

Sounds to me like a niche issue with certain default configurations of certain Linux distributions that can be easily worked around. I'll have a look when time permits, but note that this is not a high priority for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants