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

allow python under sharness to find modules installed with pip --user #1925

Merged
merged 1 commit into from Jan 16, 2019

Conversation

grondo
Copy link
Contributor

@grondo grondo commented Jan 16, 2019

This fixes the problem described in #1924 by determining the real HOME in 01-setup.sh and appending site.USER_SITE from python to PYTHONPATH before executing tests. This allows python to find user site installed installed modules (e.g. with pip install --user), even though sharness reassigns the HOME variable.

Problem: Python can't find modules installed by pip install --user
in the testsuite because sharness reassignes the HOME variable.

Deduce the real HOME and assign it to REAL_HOME in
sharness.d/01-setup.sh.  Use this variable to append the true
`site.USER_SITE` path to PYTHONPATH.

Fixes flux-framework#1924
@codecov-io
Copy link

Codecov Report

Merging #1925 into master will increase coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master   #1925      +/-   ##
=========================================
+ Coverage   80.07%   80.1%   +0.02%     
=========================================
  Files         195     195              
  Lines       35080   35080              
=========================================
+ Hits        28092   28100       +8     
+ Misses       6988    6980       -8
Impacted Files Coverage Δ
src/modules/kvs/kvs.c 66.92% <0%> (+0.14%) ⬆️
src/common/libflux/message.c 81.51% <0%> (+0.24%) ⬆️
src/broker/modservice.c 79.8% <0%> (+0.96%) ⬆️
src/modules/barrier/barrier.c 78.62% <0%> (+2.06%) ⬆️

@garlick
Copy link
Member

garlick commented Jan 16, 2019

Thanks for running this down!

@garlick garlick merged commit e4e8ebd into flux-framework:master Jan 16, 2019
@grondo grondo deleted the issue#1924 branch February 8, 2019 00:43
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

Successfully merging this pull request may close these issues.

None yet

3 participants