Skip to content

Test bootstrapping in a workflow#25138

Merged
alalazo merged 10 commits intospack:developfrom
alalazo:features/packages_can_override_site_packages_dir
Aug 3, 2021
Merged

Test bootstrapping in a workflow#25138
alalazo merged 10 commits intospack:developfrom
alalazo:features/packages_can_override_site_packages_dir

Conversation

@alalazo
Copy link
Copy Markdown
Member

@alalazo alalazo commented Jul 29, 2021

fixes #24928

Clingo install Python extensions in non-standard locations and after #24095 this causes issues on some platforms. This PR:

  • Add a default site_packages_dir property at the package level for each PythonPackage
  • Override that property for clingo-bootstrap
  • Add a new workflow to test bootstrapping on different operating systems

@adamjstewart adamjstewart self-assigned this Jul 30, 2021
@alalazo alalazo force-pushed the features/packages_can_override_site_packages_dir branch 2 times, most recently from 9e20a36 to 1d98373 Compare July 30, 2021 16:52
@alalazo alalazo changed the title Python extensions can override site_packages_dir Test bootstrapping in a workflow Jul 30, 2021
@alalazo alalazo force-pushed the features/packages_can_override_site_packages_dir branch from e484f68 to 559a963 Compare July 30, 2021 19:05
@becker33
Copy link
Copy Markdown
Member

I think as we add the binary bootstrapping PR we should update this to include tests for bootstrapping from binaries.

@alalazo alalazo force-pushed the features/packages_can_override_site_packages_dir branch from 068af2f to d278874 Compare August 2, 2021 14:54
@alalazo alalazo marked this pull request as ready for review August 2, 2021 18:40
@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Aug 2, 2021

@adamjstewart I think this is ready for a review. It's not perfect, but I'd rather merge this as is, if you don't see any big issue, and work later on simplifying the site_packages_dir etc. machinery. With this at least we'll fix the issues with bootstrapping clingo from sources.

@alalazo alalazo added the hotfix label Aug 2, 2021
@adamjstewart
Copy link
Copy Markdown
Member

It's not perfect, but I'd rather merge this as is, if you don't see any big issue, and work later on simplifying the site_packages_dir etc. machinery.

I'm a little wary of a quick fix that could potentially break other packages. What if we instead compute this in bootstrap.py instead of in the base class and come up with a more robust solution later? That solves the clingo problem and doesn't change the API until we figure out a more robust way for site_packages_dir to be overridden.

@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Aug 2, 2021

What if we instead compute this in bootstrap.py instead of in the base class and come up with a more robust solution later? That solves the clingo problem and doesn't change the API until we figure out a more robust way for site_packages_dir to be overridden.

We can do that, but it means undoing #24095 in bootstrap.py. Note that we don't bootstrap only clingo but also Python packages needed for e.g. spack style and those are working.

@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Aug 3, 2021

@adamjstewart @tgamblin This is ready to be reviewed and merged if there are no issues

Copy link
Copy Markdown
Member

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

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

I'm fine with this solution until we figure out a more robust way to allow packages to override site_packages_dir

@alalazo alalazo merged commit 0026d60 into spack:develop Aug 3, 2021
@alalazo alalazo deleted the features/packages_can_override_site_packages_dir branch August 3, 2021 14:53
@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Aug 3, 2021

Thanks @adamjstewart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clingo bootstrap doesn't work on Gentoo

3 participants