question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
sdispatercommented, Mar 21, 2021

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 the poetry.exe script which is then symlinked (or copied if symlinks are not available) to the destination directory.

1reaction
naveen521kkcommented, Mar 21, 2021

If using pip or pipx to install poetry does this anyway, I would be inclined to rather make a not int he documentation and move on.

Yes, pipx or pip creates a .exe file and I have seen pipx and pip both using distlib.

Since the bootstrap script is intended to work with no or limited dependencies, I would be hesitent to even require distlib. As this is not necessarily always available and there are known issues inconsistencies with distro vendored installations of the package (eg: ubuntu).

I would say doing this only on Windows is fine actually because that’s the place where an exe is required.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Make an "EXE" Installation File - MakeUseOf
1. Make a Quick EXE File Using 7-Zip · Prepare all of your files and directories within a single main directory and name...
Read more >
How to Make an Exe File (with Pictures) - wikiHow
1. Open Start {"smallUrl":"https:\/\/www.wikihow.com\/images\/0\/07\/Windowsstart.png","bigUrl":"\/images\/thumb\/0\/07\/Windowsstart.png\/30px-Windowsstart ... 2. Type notepad into Start. This will search your computer for the Notepad app. 3. Click Notepad. It's...
Read more >
EXE setup file - EXE Bootstrapper command line
Advanced Installer comes with a Setup program which can be used as a Bootstrapper. This is useful if you want to create an...
Read more >
Creating a Single Executable File for Distribution
1. Launch the Release Wizard. · 2. Navigate to the General Options panel. · 3. Select the Create a single file executable check...
Read more >
how to make installer (exe) file in windows - Stack Overflow
I got a link http://www.msdotnet.co.in/2012/06/how-to-create-setup-fileexe-file-from.html#.U3GT7YGSzxp which tells how to create a installer ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found