Over at numpy/numpy#30189 I tried to replace the choco download of pkgconfiglite on windows with a pur-python alternative. It turns out that package is broken.
It got me thinking: what if we packaged a console entry-point script pkg-config with this package. We already have the proper get_pkg_config() output, so most of the work would be to
- create a command line parser using
argparse
- turn
__main__ into a console script entry point in pyproject.toml
- If
pkg-config is on thePATH, passthrough to it.
- If scipy-openblas is not the library name, error out as-if
pkg-config is not found
- Handle just enough command-line arguments to make meson happy.
This would simplify building on windows: if this package is installed, no additional pkg-config executable would be needed.
Another option would be to add a custom meson Dependency class for scipy-openblas, but the problem is in the initial BLAS/LAPACK detection logic, how do we specify that the package exists?
Over at numpy/numpy#30189 I tried to replace the choco download of pkgconfiglite on windows with a pur-python alternative. It turns out that package is broken.
It got me thinking: what if we packaged a console entry-point script
pkg-configwith this package. We already have the properget_pkg_config()output, so most of the work would be toargparse__main__into a console script entry point inpyproject.tomlpkg-configis on thePATH, passthrough to it.pkg-configis not foundThis would simplify building on windows: if this package is installed, no additional pkg-config executable would be needed.
Another option would be to add a custom meson Dependency class for scipy-openblas, but the problem is in the initial BLAS/LAPACK detection logic, how do we specify that the package exists?