Path: csiph.com!aioe.org!bofh.it!news.nic.it!robomod From: c.buhtz@posteo.jp Newsgroups: linux.debian.maint.python Subject: How do you create entry-points for Python =?UTF-8?Q?applications?= =?UTF-8?Q?=3F?= Date: Sun, 18 Dec 2022 20:20:01 +0100 Message-ID: X-Original-To: Debian Python X-Mailbox-Line: From debian-python-request@lists.debian.org Sun Dec 18 19:19:06 2022 Old-Return-Path: X-Amavis-Spam-Status: No, score=-9.401 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FOURLA=0.1, LDO_WHITELIST=-5, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -5.5 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Mail-Followup-To: Debian Python X-Mailing-List: archive/latest/20612 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/385ec8ae34ef53f01a86b49c0f15504f@posteo.de Approved: robomod@news.nic.it Lines: 25 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Sun, 18 Dec 2022 19:18:44 +0000 X-Original-Message-ID: <385ec8ae34ef53f01a86b49c0f15504f@posteo.de> Xref: csiph.com linux.debian.maint.python:14745 Hello, a python application isn't a binary but a script. So to invoke such an application there need to be a shell script somewhere in PATH that invoke that script via python3 interpreter. Imagine an application with a GUI (qt, tikinter, gtk, ...). On the upstream site modern python projects using pyproject.toml (only), some use setup.cfg. There you can define "entry points" and the "pip" installer does generate a shell script based on that information and place it in PATH. That is a nice mechanism when installing via pip. On your site as distro maintainers. How do you take care of then when creating deb files? When a project do follow modern python packaging standards using pyproject.toml/setup.cfg and doesn't offer any other explict start shell script. Do you use that pip mechanic for the deb package? Or how do you create your shell scripts? I don't have an real world example of a python application for that. I only have an example of a project (backintime) that don't use pyproject.toml/setup.cfg and offer its own shell script. I'm part of the new maintainer team and we will evolve the project to current python packaging standards; which means using pyproject.toml.