Skip to content

Commit

Permalink
ENH: disable saving the bytecode cache for editable Python modules
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dnicolodi committed Mar 11, 2023
1 parent 9e826ba commit fbb9bb9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mesonpy/_editable.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ def __init__(self, name: str, path: str, tree: Node):
super().__init__(name, path)
self._tree = tree

def set_data(self, path: Union[bytes, str], data: bytes, *, _mode: int = ...) -> None:
# disable saving bytecode
pass

def get_resource_reader(self, name: str) -> TraversableResources:
return MesonpyReader(name, self._tree)

Expand Down

0 comments on commit fbb9bb9

Please sign in to comment.