Path: csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod From: Piotr =?utf-8?Q?O=C5=BCarowski?= Newsgroups: linux.debian.maint.python Subject: Python/LibraryStyleGuide: Executables and library packages dokonana przez BarryWarsaw Date: Wed, 07 Oct 2015 23:40:02 +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 21:34:47 2015 Old-Return-Path: X-Amavis-Spam-Status: No, score=-12.5 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.198, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, LDO_WHITELIST=-5, PGPSIGNATURE=-5, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate:hard: -7 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=YcoBprcXjHdoHC+qmtrp8qXibHz47KZzGPSh69Epe6M=; b=FrnPzY27sbd9bXqMA7Q2kRWWAeL8OU84hxTMKn8lOUGyk9aFEVZa/Hfv2jIVd1VWuT dNaxG8z3t+y5fi5VUtsowiAMfgWrvZ0fUovFuDjJgNp0sP3JSwku6rc3ZX7KavSqSHaA cI/SaP2ArsBho0fdrRI8qx31yV89V5vhIJ0pWpJJrlkf2B/f+ar4jrTf1jY4JQOWn7vV QBYVlOkFLo35UnPMDnpnOkOKd8Rv+8Ae2tARjVXQBx7a4Y2jgYoWelh9rTMWr2E+aAXh Nijinu4ucHyksAXPBVoujBTQ3YLv2voWkinZEL8Lk1WA0z9F0OTMv/nX39B5vKk5Sl+Q 2drQ== X-Received: by 10.112.158.38 with SMTP id wr6mr1815047lbb.25.1444253672292; Wed, 07 Oct 2015 14:34:32 -0700 (PDT) Sender: robomod@news.nic.it Mail-Followup-To: debian-python@lists.debian.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="mSxgbZZZvrAyzONB" Content-Disposition: inline X-Operating-System: Debian GNU/Linux (4.2.0-trunk-amd64) User-Agent: Mutt/1.5.24 (2015-08-30) X-Mailing-List: archive/latest/12855 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/20151007213428.GD3938@p1otr.com Approved: robomod@news.nic.it Lines: 86 Organization: linux.* mail to news gateway X-Original-Date: Wed, 7 Oct 2015 23:34:28 +0200 X-Original-Message-ID: <20151007213428.GD3938@p1otr.com> X-Original-References: <20151007200458.10642.47153@wilder.debian.org> X-Original-Sender: =?UTF-8?Q?Piotr_O=C5=BCarowski?= Xref: csiph.com linux.debian.maint.python:7544 --mSxgbZZZvrAyzONB Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [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 lib= raries, and a Python 3 executable. What is the best practices for naming a= nd 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 that= library doesn't need) maybe extent it to: * python-foo -- the Python 2 library (and Python 2.X scripts if they'r= e 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 `py= thon3-foo` but you '''CANNOT''' put it in `python-foo` or for that matter a= ny binary package that starts with the `python-` prefix. `dh_python3` refu= ses to rewrite shebang lines for any executable in a binary package that st= arts with "python-" or "pypy-". This means that something like `python-foo= -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 maybe= we should): > +=20 > + * `foo` - this is nice if it parallels the /usr/bin/foo name but it mi= ght collide with existing packages, and some people don't like to make such= 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 --=20 Piotr O=C5=BCarowski Debian GNU/Linux Developer www.ozarowski.pl www.griffith.cc www.debian.org GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645 --mSxgbZZZvrAyzONB Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJWFY/kAAoJEK728aKnRXZFXlkP/23/1qi8Bai/GRJ1foclcuS7 Unl3rQJ7NOCot5bxyzL+k8yvOT9NGyyn7hExnerXK3BXU9nwLjx5hDWNoSRf+kE7 53O5f5MSk39cEu5kglZ0Tlhy02ALVa67lzdJkEuiZSIyieca0y3+TAUdveOwMLfg 5+iHdEmVKebCCU45AXf5qHsWP817MFqd17siew7MYexok5rf1rcEQFj82nScRkOs YzFwR/l5qZptoHPuqpHojp6Z5S0F3TILmzAppqzEACggWAAMgiCiF4N/oK5Ii7Xr /7voqlFKM4ZMrFkeQ6mMr7jgO68B+PLem7YCSEuB8vbx7cU9uBr8AkR1MpQGpLx5 xeYxVPsOKpp7KHtR1ltrVT4Nd3Ya91/heIJLlPbrYiym7l3uzIMdjeigUqrqtHTv fwM96Yb2nDLh3XH5KlVjUwjW/I1pHIw27rKtbHHWxXLDFV9rnHwKqkE4KMNGhkhm egEpn2nore0Dt5H1OZ1ByeuOJ0sLTzx8vxaY/Od686X90Hl1Bzes0Npced+OCIOD oPwKnIRpbf5DjMUPqECd1t4D0GVNLXnpoAP882/sEx0QmiV4lF0ac1atsTdYcAb7 fT5wkdrBhRrnz+igVGSbBFTMFuum3mn10ZgKPRqJUW+9Iqc/K6SMtoYea3xhY3Q6 2RiYdL61MbvrQZYX7HcC =xDeA -----END PGP SIGNATURE----- --mSxgbZZZvrAyzONB--