Skip to content

Consider using extension-helpers package for OpenMP helpers #15917

Closed

Description

@astrofrog

@Cadair and I were pleased to notice that you use a fork of the openmp_helpers.py file from astropy in scikit-learn:

https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/_build_utils/openmp_helpers.py

We just wanted to let you know that we have been working on generalizing the helpers we use in astropy and have now released a lightweight and general package called extension-helpers which includes the OpenMP helpers. This package is intended to be used as a build-time dependency in a pyproject.toml file if/once you switch to using this to specify build-time requirements.

Would you be interested in contributing your fixes to openmp_helpers.py upstream to extension-helpers, and using extension-helpers as a build-time dependency? Let us know if you have any questions about extension-helpers! (the GitHub repository is at https://github.com/astropy/extension-helpers).

Activity

  1. rth commented on Dec 19, 2019

    @rth
    Member

    Thanks for opening this issue. Yes it could make sense to share some of the work OpenMP given that it's non trivial. In particular there is the issue with the need to vendor runtime MSVC libraries for OpenMP in windows wheels cf #15899 (comment) that is probably not scikit-learn specific.

    As for adding extension-helpers as a build dependency once we support pyproject.toml @jeremiedbb might have an opinion.

  2. lorentzenchr commented on Nov 15, 2026

    @lorentzenchr
    Member

    🤖 (Claude) says:

    Thanks for the suggestion back then. scikit-learn has since moved its build to Meson (meson-python), and OpenMP detection is now done by Meson's built-in dependency('openmp'). sklearn/_build_utils/openmp_helpers.py no longer exists, so this no longer applies. Closing.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Build / CINeeds Decision

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions