Skip to content

Handling a submodule within your repository that has compiled code #403

@adam2392

Description

@adam2392

Hi,

I am loving the new feature of editable installs on v0.13. I have a question regarding submodules. I am using Meson-Python itself to build my entire Python package, which has Cython and Python code and prolly soon a little bit of C++.

I am currently trying to vendor a fork of a popular package (scikit-learn) within my codebase. The current strategy I have is to create a maintained fork of scikit-learn and release it on pypi under an alias (e.g. scikit-learn-tree). However, this is not an ideal strategy as this prevents 3rd party packages that depend on scikit-learn from depending on my package. As a work-around it has been suggested that I vendor the forked repo as a submodule within my package instead.

However, this now raises a few questions as to how to build and develop on the package:

  1. Is meson-python capable of building a submodule that doesn't use meson, but setuptools? E.g. something like ./spin build -j 4 (which also calls python setup.py install ./<my_pacakage>/_lib/scikit_learn_fork/)
  2. Can this be done automatically and cleanly?
  3. If not, is there another way of handling this situation using Meson?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions