Skip to content

Comments

make compatible with pip install -e ("editable") installs + minor other fixes#58

Open
chenel wants to merge 5 commits intomainfrom
bugfix/editable-install
Open

make compatible with pip install -e ("editable") installs + minor other fixes#58
chenel wants to merge 5 commits intomainfrom
bugfix/editable-install

Conversation

@chenel
Copy link
Collaborator

@chenel chenel commented Feb 23, 2026

By default, the setup.cfg rearranges the output directory structure when using pip install.  However, pip install has an -e flag, which, instead of actually installing the package, creates an "in-place" installation that's editable.  The trouble is that the package structure as stored in Git (which is designed to be easier to navigate when editing) doesn't correctly interact with the path structure needed by matplotlib.
Here we fix this __init__.py (which is not used when the package is installed via setup.py) so that it performs the same $MPLCONFIGDIR mangling that the python/__init__.py would otherwise do in a normal installation. This PR is a solution for the problem identified in #57, but without moving all the directories around.

This PR also includes a couple other smaller fixes (including a compatibility fix for one of the examples with numpy 2.4+).

The `setup.cfg` rearranges the output directory structure when using `pip install`.  However, `pip install` has an `-e` flag, which, instead of actually installing the package, creates an "in-place" installation that's editable.  The trouble is that the package structure as stored in Git (which is designed to be easier to navigate when editing) doesn't correctly interact with the path structure needed by matplotlib.
Here we fix this `__init__.py` (which is not used when the package is installed via setup.py) so that it performs the same `$MPLCONFIGDIR` mangling that the `python/__init__.py` would otherwise do in a normal installation.
@chenel chenel requested a review from a team as a code owner February 23, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant