Path: csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod From: Barry Warsaw Newsgroups: linux.debian.maint.python Subject: Re: Python/LibraryStyleGuide: Executables and library packages dokonana przez BarryWarsaw Date: Thu, 08 Oct 2015 00:10:01 +0200 Message-ID: References: X-Original-To: debian-python@lists.debian.org X-Mailbox-Line: From debian-python-request@lists.debian.org Wed Oct 7 22:08:55 2015 Old-Return-Path: X-Amavis-Spam-Status: No, score=-12 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, LDO_WHITELIST=-5, PGPSIGNATURE=-5] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -5 Organization: The Organization of Unorganized Woozalists X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/Yo_bzT5buGaomLJSd27qdou"; protocol="application/pgp-signature" X-Mailing-List: archive/latest/12858 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/20151007180835.31cc8192@limelight.wooz.org Approved: robomod@news.nic.it Lines: 92 Sender: robomod@news.nic.it X-Original-Date: Wed, 7 Oct 2015 18:08:35 -0400 X-Original-Message-ID: <20151007180835.31cc8192@limelight.wooz.org> X-Original-References: <20151007200458.10642.47153@wilder.debian.org> <20151007213428.GD3938@p1otr.com> Xref: csiph.com linux.debian.maint.python:7546 --Sig_/Yo_bzT5buGaomLJSd27qdou Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks for the feedback. I did rewrite this a little bit, so hopefully it's clearer. I left some of the text in there because at least to me it reads better and provides some rationale for why the rules are there. But hey, i= t's a wiki so please feel free to make further improvements! Cheers, -Barry On Oct 07, 2015, at 11:34 PM, Piotr O=C5=BCarowski wrote: >[Debian Wiki, 2015-10-07] >> https://wiki.debian.org/Python/LibraryStyleGuide?action=3Ddiff&rev1=3D64= &rev2=3D65 >>=20 >> =20 >> =3D=3D Gotchas =3D=3D >> =20 >> + =3D=3D=3D Executables and library packages =3D=3D=3D >> +=20 >> + Let's say you have a Python package which results in Python 2 and 3 li= braries, and a Python 3 executable. What is the best practices for naming = and organizing your binary packages? >> +=20 >> + Clearly you want to have: >> +=20 >> + * python-foo -- the Python 2 library >> + * python3-foo -- the Python 3 library > > * foo -- for the executable (and possible additional dependencies tha= t library doesn't need) > >maybe extent it to: > > * python-foo -- the Python 2 library (and Python 2.X scripts if they'= re Python 2.X specific) > * python3-foo -- the Python 3 library (and Python 3.X scripts if they= 're Python 3.X specific) > >> +=20 >> + but where should the `/usr/bin/foo` script go? You could put it in `p= ython3-foo` but you '''CANNOT''' put it in `python-foo` or for that matter = any binary package that starts with the `python-` prefix. `dh_python3` ref= uses to rewrite shebang lines for any executable in a binary package that s= tarts with "python-" or "pypy-". This means that something like `python-fo= o-cli` or `python-foo-bin` is unacceptable. > >I'd remove this part - it's not dh_python3 specific (dh_python2 and >dh_pypy does similar things) and I don't think such corner case should >be in style guide > >> +=20 >> + Here are some recommendations. We do not have a standard (though mayb= e we should): >> +=20 >> + * `foo` - this is nice if it parallels the /usr/bin/foo name but it m= ight collide with existing packages, and some people don't like to make suc= h a claim on an unadorned top level package >> + * `python3-foo-cli` or `python3-foo-bin` - not as nicely discoverable= , but `command-not-found` can help, and dh_python3 will work > >if someone creates python3-foo-cli binary just to ship /usr/bin/foo it >might as well be foo (if there are no /usr/bin/foo name collisions, >binary package name should be safe as well) so I'd remove it --Sig_/Yo_bzT5buGaomLJSd27qdou Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWFZfjAAoJEBJutWOnSwa/mNcP/iof0lSyKdXDOvK5bNjVGfC0 QK+RdNq9k3gxT3jelS4RJKxqG72MkwRv6+Iw4fjKjXW2MrZKg5+++XeDIg0TvR7j oAgJlhIA6DqrT4GjS3XHpDO+/IBqFAq6FLYvMAZIY6J7zECdUuK09ooL0mX4lUpH tlbWbsQvQDqReExVOhg6uPUb2wN/WY+xVwjafPEuVbUwvm46D8tps5GOcw5MLU5Z Va6nu7etJUya98F/MeQ960cyjoVcwl8wvhcftF9/KmGGNe7qnpNkCiQ/+detBM3E 9Z4WKughOJ2ikDYHOC1Zi3e4vMiFxYpHw/WDBSw2y/MBvPTu+yGAUCrWGePtogEZ 4CIaiGqnmnLXH3bPGiwEtIbG41168DwZiFxZ0rscdH48CvKmVemiMkKi0HWXQ1QA 8R+nuwmaVi6arDCUdypiZMC0+8a3AuDA3Y1SKH+tlM13IEQJvVYqfXaYz+46EXx3 dkATJRrswYgCHMq0TIuCJw6oLy2hq3+8xY7FErheniD+K9AjcusUXQ0eFdC2Pi2n g7vnIoWD1gom2lr18V2SkYaeSTzvJUs9nRgg5G+0s50KMMXPQKz+zF0OZ7fg8myA WksFo5gZGKWnL+PoTPygm6WAoCbWR4Cm8zsoCb8aZ8gWll9BAVnX5E+boT4wwqAz B8sv+T08nBnwn2BD7Bbd =eHbw -----END PGP SIGNATURE----- --Sig_/Yo_bzT5buGaomLJSd27qdou--