Skip to content

hunt for usable 'python' command in PythonPackage easyblock when system Python is used#861

Merged
boegel merged 9 commits intoeasybuilders:developfrom
boegel:pythonpackage_find_python
Mar 9, 2016
Merged

hunt for usable 'python' command in PythonPackage easyblock when system Python is used#861
boegel merged 9 commits intoeasybuilders:developfrom
boegel:pythonpackage_find_python

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Mar 9, 2016

This is required to fix the problem with bootstrapping EasyBuild in an environment where Python 3.x is the default python, and where python2 is also available.

@boegel boegel added this to the v2.7.0 milestone Mar 9, 2016
@boegel
Copy link
Copy Markdown
Member Author

boegel commented Mar 9, 2016

@wpoely86: please review

@hpcugentbot
Copy link
Copy Markdown

Easyblocks unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-easyblocks-pr-builder/1774/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

if req_min_ver is not None:
# check minor version
pycode = 'import sys; print "%s.%s" % sys.version_info[:2]'
out, _ = run_cmd("%s -c '%s'" % (python_cmd, pycode), simple=False)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe do 1 python call and use zero for req_min_ver if it's not specified?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, makes sense, will do

@hpcugentbot
Copy link
Copy Markdown

Easyblocks unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-easyblocks-pr-builder/1775/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@wpoely86
Copy link
Copy Markdown
Member

wpoely86 commented Mar 9, 2016

👍

@hpcugentbot
Copy link
Copy Markdown

Easyblocks unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-easyblocks-pr-builder/1776/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@hpcugentbot
Copy link
Copy Markdown

Easyblocks unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-easyblocks-pr-builder/1777/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@hpcugentbot
Copy link
Copy Markdown

Easyblocks unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-easyblocks-pr-builder/1778/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@hpcugentbot
Copy link
Copy Markdown

Easyblocks unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-easyblocks-pr-builder/1780/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@hpcugentbot
Copy link
Copy Markdown

Easyblocks unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-easyblocks-pr-builder/1781/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

kwargs.update({'exts_filter': EXTS_FILTER_PYTHON_PACKAGES})
if 'exts_filter' not in kwargs:
orig_exts_filter = EXTS_FILTER_PYTHON_PACKAGES
exts_filter = (orig_exts_filter[0].replace('python', self.python_cmd), orig_exts_filter[1])
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this needed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for extensions being used with the system Python, we need to make sure we use the right Python command when doing import tests (which may be python2 rather than python)

this is important for installing the GC3Pie bundle, for example (https://github.com/hpcugent/easybuild-easyconfigs/blob/master/easybuild/easyconfigs/g/GC3Pie/GC3Pie-2.4.2.eb)

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Mar 9, 2016

This is good to go, I've thoroughly tested this by rebuilding the following:

  • EasyBuild bootstrap (e.g. on Arch Linux where python is Python 3.x)
  • GC3Pie easyconfigs (on SL6, CentOS7 and Arch Linux)
  • PyQt-4.11.4-intel-2015a-Python-2.7.9.eb
  • SIP-4.16.8-intel-2015a-Python-2.7.9.eb
  • numpy-1.10.4-intel-2016a-Python-2.7.11.eb
  • scipy-0.17.0-intel-2016a-Python-2.7.11.eb
  • vsc-base-1.7.3.eb
  • vsc-mympirun-3.4.2.eb
  • vsc-mympirun-scoop-3.4.1-intel-2015b-Python-2.7.10.eb
  • vsc-processcontrol-1.0.eb
  • vsc-processcontrol-1.0-vsc-base-2.1.2.eb
  • libxml2-2.9.3-intel-2016a-Python-2.7.11.eb
  • netcdf4-python-1.1.8-intel-2015b-Python-2.7.10.eb
  • VSC-tools-0.1.2-ictce-5.3.0-Python-2.7.3.eb

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Mar 9, 2016

Thanks for the review @wpoely86!

boegel added a commit that referenced this pull request Mar 9, 2016
hunt for usable 'python' command in PythonPackage easyblock when system Python is used
@boegel boegel merged commit 030500f into easybuilders:develop Mar 9, 2016
@boegel boegel deleted the pythonpackage_find_python branch March 9, 2016 17:06
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.

4 participants