Jenkins build fails on (at least) Amazon Linux

On (at least) Amazon Linux, the virtualenv tool configures python with the following sys.path directories:

  • ''
  • '${PYTHON_ENV}/local/lib64/python2.7/site-packages'
  • '${PYTHON_ENV}/local/lib/python2.7/site-packages'
  • '${PYTHON_ENV}/lib64/python2.7'
  • '${PYTHON_ENV}/lib/python2.7'
  • '${PYTHON_ENV}/lib64/python2.7/site-packages'
  • '${PYTHON_ENV}/lib/python2.7/site-packages'
  • '${PYTHON_ENV}/lib64/python2.7/lib-dynload'
  • '${PYTHON_ENV}/local/lib/python2.7/dist-packages'
  • '${PYTHON_ENV}/local/lib/python2.7/dist-packages'
  • '${PYTHON_ENV}/lib/python2.7/dist-packages'
  • '/usr/lib64/python2.7'
  • '/usr/lib/python2.7'

However, running pip install PyYAML in that same virtualenv will install the yaml module into the ${PYTHON_ENV}/lib64/python2.7/dist-packages directory, which is not on the search path.

For now, I am working around the problem by creating dist-packages.pth files as follows:

find ${PYTHON_ENV} -type d -name dist-packages -exec sh -c "echo dist-packages > {}.pth" ';'

I have created a pull-request and issue.

I will also be filing a bug-report against virtualenv as soon as I create a self-contained script illustrating the problem.

I think we should keep the discussion only on github, thanks :slight_smile:

When I opened a pull-request, github suggested that I read the contributor guidelines, which start with:

Please post all questions and issues first on Beats - Discuss the Elastic Stack before opening a Github Issue.

The Contributing to Beats document likewise starts with:

If you have a bugfix or new feature that you would like to contribute, please start by opening a topic on the forums.

So I was just posting here by direction. Sorry if my interpretation of the guidelines caused offense.

Don't worry, everything is fine! Thanks for pushing it.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.