Skip to content

Commit

Permalink
Get rid of the zipapp_main kludge
Browse files Browse the repository at this point in the history
  • Loading branch information
nbraud committed Dec 28, 2020
1 parent baa82eb commit 9a9f4a2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
11 changes: 0 additions & 11 deletions bork/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,3 @@ def main():
(log.exception if verbose else log.error)(str(err))

sys.exit(1)


def zipapp_main():
# If Bork is put in a zipapp, this allows scripts executed as subprocesses
# to access pep517.compat.
#
# The problem area is the `import compat` line in pep517's _in_process.py.
# https://github.com/pypa/pep517/blob/master/pep517/_in_process.py
os.environ['PYTHONPATH'] = ':'.join([*sys.path, sys.argv[0] + '/pep517'])

main()
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ project_name = "Bork"

[tool.bork.zipapp]
enabled = true
main = "bork.cli:zipapp_main"
main = "bork.cli:main"

[tool.bork.release]
pypi = true
Expand Down

0 comments on commit 9a9f4a2

Please sign in to comment.