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

Yet another approach to fixing local plugin installation #1065

Merged
merged 5 commits into from
Mar 9, 2023

Commits on Feb 28, 2023

  1. An alternative fix for installing local plugins.

    Here we create a "nested" virtual environment in which to install our
    plugins.  By "nested" we mean that it keeps the `site-packages`
    directory of the "containing" virtual environment (or the system, if
    there is no containing virtual environment on sys.path. (It does this
    via some `.pth` file magic.)
    
    This allows us to use plain old `pip install` to install plugins,
    rather than having to resort to `pip install --target <dir>` which
    was causing all sorts of grief.
    
    This also allows us to generalize our plugin installation machinery to
    support any PEP517 / PEP660 compatible distribution.
    
    We've also cleaned up detection of changed requirements.
    
    Previously, the package cache was created whenever:
    
    - Any new plugin (local or remote) was added to the project
    - Any plugin (local or remote) was removed from the project
    - The specified version for any remote plugin was changed
    
    Now that we are using a real virtualenv to manage installation, we
    could probably loosen these requirements, and let pip deal with, e.g,
    reconciling changes in requested package version.
    
    For now, we keep the existing behavior, but clean up the logic for
    detecting when requirements have changed.
    dairiki committed Feb 28, 2023
    Configuration menu
    Copy the full SHA
    e926c6d View commit details
    Browse the repository at this point in the history
  2. Delete unused lektor.packages.PackageException

    This appears not ever to have been referenced since the initial commit
    in this repo.
    dairiki committed Feb 28, 2023
    Configuration menu
    Copy the full SHA
    6a7c865 View commit details
    Browse the repository at this point in the history
  3. Remove the lektor dev publish-plugin sub-command

    (Hopefully no one is using this.)  For publishing to PyPI, there's no
    reason not to use the standard tools (e.g. `build` and `twine`) for
    this.
    dairiki committed Feb 28, 2023
    Configuration menu
    Copy the full SHA
    0ff3fea View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    07145ee View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c6bbf29 View commit details
    Browse the repository at this point in the history