-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected
Description
- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption).
- OS version and name: cygwin
- Poetry version: Poetry version 1.1.8
- Link of a Gist with the contents of your pyproject.toml file:
[tool.poetry]
name = "xxx"
version = "0.2"
description = ""
authors = ["xxx"]
[tool.poetry.scripts]
xxx-yyy = "xxx:yyy"
xxx-zzz = "xxx:zzz"
Issue
when running poetry install in the repo, the script produced is :
#!/.../bin/python
from xxx import yyy
if __name__ == '__main__':
yyy()
(from
| SCRIPT_TEMPLATE = """\ |
but when running pip install ., the script produced is :
#!/.../python
# -*- coding: utf-8 -*-
import re
import sys
from xxx import yyy
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(yyy())
I believe pip is the correct behaviour with the sys.exit :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected