Skip to content

Commit

Permalink
Use io.open_code for reading code
Browse files Browse the repository at this point in the history
  • Loading branch information
bswck authored Aug 30, 2024
1 parent c31c76a commit b512ae7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,11 @@ def build_editable(wheel_directory, config_settings=None, metadata_directory=Non

def proxy():
return textwrap.dedent(f"""
import io
__path__ = [{os.getcwd()!r}]
__file__ = __path__[0] + '/__init__.py'
try:
strm = open(__file__, 'rb')
strm = io.open_code(__file__)
except FileNotFoundError:
pass
else:
Expand Down

0 comments on commit b512ae7

Please sign in to comment.