4 ms·
Another possibility is using the `scripts` in the `pyproject.toml`, as described here: https://python-poetry.org/docs/pyproject/#scripts https://python-poetry.o
by hackandtrip 4y ago
Another possibility is using the `scripts` in the `pyproject.toml`, as described here: https://python-poetry.org/docs/pyproject/#scripts https://python-poetry.org/docs/pyproject/#scripts
- hprotagonist 4y agothat’s generally not correct. entry points are how your package, once installed, is called from the command line; i wouldn’t wire up a docker image build step or twine publish that way.
- zer0w1re 4y agoThose two examples are the exact use-case that defining scripts in pyproject.toml are meant for. Users of my installed package would never need to run `twine publish` or build the project's docker image. That's only really needed by developers who would be working from the full project source including pyproject.toml.
- hprotagonist 4y agoentry points are installed to the interpreter site when you `pip install`: everyone gets them including your users.
- leblancfg 4y agoThat's specifically for the Poetry package manager, not Python in general.
- nomel 4y agoNeither is make. You’re using an external tool either way. The one purpose built for the task, and doesn’t have a bunch of archaic footguns [1], will probably give a better experience. 1. https://stackoverflow.com/questions/17965806/how-do-i-handle-files-with-spaces-in-my-makefile#:~:text=The%20very%20short%2C%20but%20IMO%20ultimately%20correct%2C%20answer,make%2C%20your%20%22anonymous%20developers%22%20simply%20cannot%20use%20them https://stackoverflow.com/questions/17965806/how-do-i-handle....
- paiute 4y agopyproject.toml is for python in general. https://peps.python.org/pep-0621/ https://peps.python.org/pep-0621/ setup.py is legacy.
- leblancfg 4y agoThe GP comment was referring to the `tools.poetry.scripts` namespace in pyproject.toml.