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 wxPython to be installed as an extension #2227

Merged
merged 2 commits into from
Nov 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions easybuild/easyblocks/w/wxpython.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import os

from distutils.version import LooseVersion
from easybuild.easyblocks.generic.pythonpackage import PythonPackage
from easybuild.easyblocks.generic.pythonpackage import PythonPackage, det_python_version
from easybuild.tools.modules import get_software_root
from easybuild.tools.run import run_cmd
from easybuild.tools.systemtools import get_shared_lib_ext
Expand Down Expand Up @@ -79,7 +79,18 @@ def install_step(self):
'script': script,
'prefix': self.installdir,
}
cmd = cmd + " %s -v install" % self.wxflag
# install fails and attempts to install in the python module. building the wheel, and then installing it
cmd = cmd + " %s -v bdist_wheel" % self.wxflag
run_cmd(cmd, log_all=True, simple=True)

# get whether it is 35, 36, 37, 38, etc.
pyver = det_python_version(self.python_cmd)
pyver = pyver[0] + pyver[2]

cmd = "pip install --no-deps --prefix=%(prefix)s dist/wxPython-%(version)s-cp%(pyver)s*.whl" % {
'prefix': self.installdir,
'version': self.version,
'pyver': pyver}
else:
script = os.path.join('wxPython', 'build-wxpython.py')
cmd = INSTALL_CMD % {
Expand Down Expand Up @@ -133,7 +144,7 @@ def sanity_check_step(self):
# also test importing wx.lib.wxcairo
custom_commands = [(self.python_cmd, '-c "import wx.lib.wxcairo"')]

super(EB_wxPython, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands)
return super(EB_wxPython, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands)

def make_module_extra(self):
"""Custom update for $PYTHONPATH for wxPython."""
Expand Down