This repository provides the patches and build instructions necessary to compile and package the Windows Python entry-point launchers used in the conda ecosystem.
These are the binaries that you can find next to all those *-script.py files in your %PREFIX%\Scripts directory. Their sole purpose is to:
- Find the necessary Python executable in the directory above:
cli-*.exewill look forpython.exe.gui-*.exewill look forpythonw.exe.
- Locate the adjacent Python script. This is based on the name of launcher itself. The target Python script must be
[name of the launcher without extension]-script.py. So if you have a copy of the launcher namedmy-application.exe, it will look formy-application-script.py. - Execute
..\python[w].exe [adjacent-script].py.
conda and conda-build will place an adequately renamed copy next to each Python console_scripts entry point created.
These launchers are based on the CPython 3.7 launcher. These launchers were then patched for the conda ecosystem and historically provided in the conda/conda-build repository:
- The binaries were committed directly in the git history:
- The build instructions were in
launcher_sources
conda/conda also shipped its own copies of cli-64.exe and cli-32.exe to create its own entry point upon reinitialization, plus the entry points for noarch packages.
In April 2024, the files were committed again after being codesigned by Anaconda (see conda/conda#13685 for details).
This repository now collects all those sources and suggests a way to package them as a conda package for easy reutilization.
The launchers will provide some debugging information if the environment variable PYLAUNCH_DEBUG=1 is set.