Create a .exe file using Default Installer
See original GitHub issue- I have searched the issues of this repo and believe that this is not a duplicate.
- I have searched the documentation and believe that my question is not covered.
Feature Request
First, using the default installer as specified in the documentation, https://python-poetry.org/docs/#windows-powershell-install-instructions, it creates a .bat
file in %USERPROFILE%\.poetry\bin
folder. I want it to create an exe
file instead of a batch file.
It can be done using the way setuptools
does it. Essentially, it would be to find cli.exe
or cli-64.exe
and rename it to poetry.exe
and create a file called poetry-script.py
instead of the currently present, poetry
(without any extension) file.
Usually, setuptools
is installed by default. If it not, the .tar.gz
for windows, can include a copy of cli.exe
and cli-64.exe
which can be easily compiled using, https://github.com/pypa/setuptools/blob/main/launcher.c
Note: poetry-script.py
needs to have proper shebang with full paths.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
The new bootstrapping method (see https://github.com/python-poetry/poetry/pull/3706) will solve this. Basically, the new method uses
pip
which in turn creates thepoetry.exe
script which is then symlinked (or copied if symlinks are not available) to the destination directory.Yes,
pipx
orpip
creates a.exe
file and I have seenpipx
andpip
both using distlib.I would say doing this only on Windows is fine actually because that’s the place where an exe is required.