Search code examples
pip

pip feature to create a shell script[s] for a python package


poetry has a feature for creating a shell script to set up the environment and launch the local python package. The following directive in pyproject.toml generates a shell script hercl that has the needed env including python path/libraries to run the hercl.hercl.py main() :

[tool.poetry.scripts]
hercl = "hercl.hercl:main"

I have heard rumors that pip itself has a similar capability. I have been unable to find that feature: does it really exist?


Solution

  • Oh! It looks like pip supports pyproject.toml directly! It is called the Build System Interface It is apparently a newer approach in conjunction with setup.py. I'll get back here on how that goes.