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

ENH: implement editable wheels without having to run meson install #279

Merged
merged 7 commits into from
Mar 11, 2023

Commits on Mar 11, 2023

  1. CI: use Python 3.9 for running mypy and bump mypy version to 0.991

    Running with Python 3.9 allows mypy to check our importlib.resource
    interfaces. mypy 0.991 does a better job in understanding typing in
    the editable support code.
    dnicolodi committed Mar 11, 2023
    Configuration menu
    Copy the full SHA
    8ae8700 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8228147 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    60c770c View commit details
    Browse the repository at this point in the history
  4. ENH: implement editable wheels without having to run meson install

    This implementation uses a .pth file to install a custom module
    finder.  The module finder uses the Meson installation plan
    introspection data to build a virtual view of how files would be laid
    out in a wheel and looks up the modules from there.
    
    Not having to copy files from the source or build directory to the
    installation directory, rebuilds are faster. Executing directly from
    the build and source directory is more true to the spirit of editable
    wheels. There is no risk for the user to accidentally edit the code in
    the installation directory and have their edits to be overwritten at
    the next reload.
    
    I haven't verified this, but this approach has also the potential to
    allow to set debugger breakpoints from the code in the source
    directory and have them work at execution time (this should work if
    the code is imported before being executed).
    dnicolodi committed Mar 11, 2023
    Configuration menu
    Copy the full SHA
    7a230bf View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3158ac2 View commit details
    Browse the repository at this point in the history
  6. MAINT: remove typing backward compatibility with Python < 3.9

    We support typing only with Python >= 3.9.
    dnicolodi committed Mar 11, 2023
    Configuration menu
    Copy the full SHA
    1fd5586 View commit details
    Browse the repository at this point in the history
  7. ENH: disable saving the bytecode cache for editable Python modules

    This avoids cluttering the source directory with bytecode cache. It
    should also avoid surprising behavior when the source is removed from
    version control but the bytecode cache is still present in the working
    directory.
    dnicolodi committed Mar 11, 2023
    Configuration menu
    Copy the full SHA
    a89c299 View commit details
    Browse the repository at this point in the history