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

only load temporary module file during sanity check for pybind11 for stand-alone installations, so it can be installed as extension #2747

Merged
merged 2 commits into from Jun 14, 2022

Conversation

mboisson
Copy link
Contributor

This is inspired from PythonPackage's sanity_check_step. Without this, the install fails in the sanity check step with

  File "/cvmfs/soft.computecanada.ca/easybuild/site-packages/easybuild-easyblocks/easybuild/easyblocks/p/pybind11.py", line 94, in sanity_check_step
    fake_mod_data = self.load_fake_module(purge=True)
  File "/cvmfs/soft.computecanada.ca/easybuild/site-packages/easybuild-framework/easybuild/framework/easyblock.py", line 1641, in load_fake_module
    fake_mod_path = self.make_module_step(fake=True)
  File "/cvmfs/soft.computecanada.ca/easybuild/site-packages/easybuild-framework/easybuild/framework/easyblock.py", line 3581, in make_module_step
    mod_filepath = self.mod_filepath
AttributeError: 'EB_pybind11' object has no attribute 'mod_filepath'

For @Micket

@mboisson
Copy link
Contributor Author

Looks like the failing test is failing to download Lmod 6.6.3, nothing to do with the PR

easybuild/easyblocks/p/pybind11.py Show resolved Hide resolved
easybuild/easyblocks/p/pybind11.py Outdated Show resolved Hide resolved
Copy link
Contributor

@Micket Micket left a comment

Choose a reason for hiding this comment

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

lgtm

@Micket Micket added the bug fix label Jun 13, 2022
@Micket Micket added this to the next release (4.5.6?) milestone Jun 13, 2022
@Micket
Copy link
Contributor

Micket commented Jun 13, 2022

Test report by @Micket

Overview of tested easyconfigs (in order)

  • SUCCESS bzip2-1.0.8-GCCcore-11.3.0.eb
  • SUCCESS cURL-7.83.0-GCCcore-11.3.0.eb
  • SUCCESS libarchive-3.6.1-GCCcore-11.3.0.eb
  • SUCCESS UnZip-6.0-GCCcore-11.3.0.eb
  • SUCCESS CMake-3.23.1-GCCcore-11.3.0.eb
  • SUCCESS Eigen-3.4.0-GCCcore-11.3.0.eb
  • SUCCESS gettext-0.21-GCCcore-11.3.0.eb
  • SUCCESS git-2.36.0-GCCcore-11.3.0-nodocs.eb
  • SUCCESS GMP-6.2.1-GCCcore-11.3.0.eb
  • SUCCESS libffi-3.4.2-GCCcore-11.3.0.eb
  • SUCCESS Tcl-8.6.12-GCCcore-11.3.0.eb
  • SUCCESS SQLite-3.38.3-GCCcore-11.3.0.eb
  • SUCCESS Python-3.10.4-GCCcore-11.3.0-bare.eb
  • SUCCESS Rust-1.60.0-GCCcore-11.3.0.eb
  • SUCCESS Python-3.10.4-GCCcore-11.3.0.eb
  • SUCCESS pybind11-2.9.2-GCCcore-11.3.0.eb

Build succeeded for 16 out of 16 (1 easyconfigs in total)
alvis-c1 - Linux Rocky Linux 8.5, x86_64, Intel Xeon Processor (Skylake), Python 3.6.8
See https://gist.github.com/85ef5fda5d724c3884291652c03a1db5 for a full test report.

@Micket
Copy link
Contributor

Micket commented Jun 13, 2022

Test report by @Micket

Overview of tested easyconfigs (in order)

Build succeeded for 0 out of 1 (1 easyconfigs in total)
alvis-c1 - Linux Rocky Linux 8.5, x86_64, Intel Xeon Processor (Skylake), Python 3.6.8
See https://gist.github.com/83e791d0ab79e72c564bab6c30e22aa8 for a full test report.

@Micket
Copy link
Contributor

Micket commented Jun 13, 2022

I'm hitting the default bundle check failing

failing sanity check for 'pybind' extension: command "python -c "import pybind"" failed; output:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pybind',  (at easybuild/framework/easyblock.py:3461 in _sanity_check_step)

so it's not even getting to the point where this test should run.
I can't see why

@Micket
Copy link
Contributor

Micket commented Jun 14, 2022

I can't make sense of why my little test isn't working

easyblock = 'PythonBundle'

name = 'test-bundle'
version = '1'

homepage = 'test'
description = """test bundle"""

toolchain = {'name': 'GCCcore', 'version': '11.3.0'}

builddependencies = [
    ('binutils', '2.38'),
    ('CMake', '3.23.1'),
]

dependencies = [
    ('Python', '3.10.4'),
]

use_pip = True
sanity_pip_check = False

exts_list = [
    ('pybind', '2.9.2', {
        'source_urls': ['https://github.com/pybind/pybind11/archive/'],
        'sources': ['v%(version)s.tar.gz'],
    }),
]

moduleclass = 'lib'

eb test-bundle-1-GCCcore-11.3.0.eb --include-easyblocks-from-pr=2747

It doesn't seem to be able to import pybind11 but.. that should just work as far as i can tell. I can see it under site-packages.

@Micket
Copy link
Contributor

Micket commented Jun 14, 2022

Thanks @smoors for pointing out my stupid mistake! pybind != pybind11 Doh!

@Micket
Copy link
Contributor

Micket commented Jun 14, 2022

Test report by @Micket

Overview of tested easyconfigs (in order)

  • SUCCESS test-bundle-1-GCCcore-11.3.0.eb

Build succeeded for 1 out of 1 (1 easyconfigs in total)
alvis-c1 - Linux Rocky Linux 8.5, x86_64, Intel Xeon Processor (Skylake), Python 3.6.8
See https://gist.github.com/db4233a1f618beeb67b1d9295404fd6b for a full test report.

@Micket Micket merged commit 956005c into easybuilders:develop Jun 14, 2022
@boegel boegel changed the title Allow pybind11 to be installed as an extension only load temporary module file during sanity check for pybind11 for stand-alone installations, so it can be installed as extension Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants