Commit b751603d authored by Jérome Perrin's avatar Jérome Perrin Committed by Kirill Smelkov

pyprog: Wrap entry-point call with sys.exit()

Reading this spec, we probably want to change
```
  entry_run = 'from %s import %s; %s()' % (mod, func, func)
```
to
```
  entry_run = 'import sys; from %s import %s; sys.exit(%s())' % (mod, func, func)
```
to follow
https://packaging.python.org/en/latest/specifications/entry-points/#use-for-scripts
, this is also what `zc.recipe.egg` does.

/reviewed-by @kirr
/reviewed-on nexedi/slapos!1108
parent 0ee52376
Pipeline #18952 failed with stage
in 0 seconds