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 7, 2023
1 parent 0e99d04 commit 82c3a5d
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 @@ -148,6 +148,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 82c3a5d

Please sign in to comment.