Path: csiph.com!aioe.org!bofh.it!news.nic.it!robomod From: =?UTF-8?B?RGFuaWFsIEJlaHphZGkg2K/Yp9mG24zYp9mEINio2YfYstin2K/bjA==?= Newsgroups: linux.debian.maint.python Subject: Re: How do you create entry-points for Python applications? Date: Sun, 18 Dec 2022 23:10:02 +0100 Message-ID: References: X-Mailbox-Line: From debian-python-request@lists.debian.org Sun Dec 18 22:03:54 2022 Old-Return-Path: X-Amavis-Spam-Status: No, score=-4.098 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, BODY_8BITS=1.5, FOURLA=0.1, HTML_MESSAGE=2, LDO_WHITELIST=-5, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001] autolearn=no autolearn_force=no X-Policyd-Weight: using cached result; rate: -4.6 X-Riseup-User-ID: 55FF76FDFF169BB00FFB649B88652D823441044C51AF7A3D5B9DF52B5BFB79A2 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=----0IASHK2NLIL0SPI1K4RMCGF3VLHOD2 Content-Transfer-Encoding: 7bit X-Mailing-List: archive/latest/20613 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/D98B9DF7-DD0F-499E-A16D-CA85A51249B9@ubuntu.com Approved: robomod@news.nic.it Lines: 66 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Sun, 18 Dec 2022 22:03:22 +0000 X-Original-Message-ID: X-Original-References: <385ec8ae34ef53f01a86b49c0f15504f@posteo.de> Xref: csiph.com linux.debian.maint.python:14746 ------0IASHK2NLIL0SPI1K4RMCGF3VLHOD2 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable AFAIK Debian helper for Python handles this =D8=AF=D8=B1 18 =D8=AF=D8=B3=D8=A7=D9=85=D8=A8=D8=B1 2022 19:18:44 (UTC)= =D8=8C c=2Ebuhtz@posteo=2Ejp =D9=86=D9=88=D8=B4=D8=AA: >Hello, >a python application isn't a binary but a script=2E So to invoke such an = application there need to be a shell script somewhere in PATH that invoke t= hat script via python3 interpreter=2E Imagine an application with a GUI (qt= , tikinter, gtk, =2E=2E=2E)=2E > >On the upstream site modern python projects using pyproject=2Etoml (only)= , some use setup=2Ecfg=2E >There you can define "entry points" and the "pip" installer does generate= a shell script based on that information and place it in PATH=2E >That is a nice mechanism when installing via pip=2E > >On your site as distro maintainers=2E How do you take care of then when c= reating deb files? >When a project do follow modern python packaging standards using pyprojec= t=2Etoml/setup=2Ecfg and doesn't offer any other explict start shell script= =2E 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=2E > >I only have an example of a project (backintime) that don't use pyproject= =2Etoml/setup=2Ecfg and offer its own shell script=2E I'm part of the new m= aintainer team and we will evolve the project to current python packaging s= tandards; which means using pyproject=2Etoml=2E > ------0IASHK2NLIL0SPI1K4RMCGF3VLHOD2 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable AFAIK Debian helper for Python handles this
=D8=AF=D8=B1 18 =D8=AF=D8=B3=D8=A7=D9=85=D8=A8= =D8=B1 2022 19:18:44 (UTC)=D8=8C c=2Ebuhtz@posteo=2Ejp =D9=86=D9=88=D8=B4= =D8=AA:
Hello,
a python application isn't a = binary but a script=2E So to invoke such an application there need to be a = shell script somewhere in PATH that invoke that script via python3 interpre= ter=2E Imagine an application with a GUI (qt, tikinter, gtk, =2E=2E=2E)=2E<= br>
On the upstream site modern python projects using pyproject=2Etoml (= only), some use setup=2Ecfg=2E
There you can define "entry points" and t= he "pip" installer does generate a shell script based on that information a= nd place it in PATH=2E
That is a nice mechanism when installing via pip= =2E

On your site as distro maintainers=2E How do you take care of th= en when creating deb files?
When a project do follow modern python packa= ging standards using pyproject=2Etoml/setup=2Ecfg and doesn't offer any oth= er explict start shell script=2E Do you use that pip mechanic for the deb p= ackage?
Or how do you create your shell scripts?

I don't have an = real world example of a python application for that=2E

I only have a= n example of a project (backintime) that don't use pyproject=2Etoml/setup= =2Ecfg and offer its own shell script=2E I'm part of the new maintainer tea= m and we will evolve the project to current python packaging standards; whi= ch means using pyproject=2Etoml=2E

<= /html> ------0IASHK2NLIL0SPI1K4RMCGF3VLHOD2--