Skip to content

Commit

Permalink
Merge pull request #22 from coherent-oss/ref/use-io-open-code
Browse files Browse the repository at this point in the history
Use `io.open_code` for reading code
  • Loading branch information
jaraco authored Aug 30, 2024
2 parents c31c76a + b512ae7 commit cf26a0a
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 cf26a0a

Please sign in to comment.