On April 6, 2016 10:37:24 PM EDT, Tiago Ilieve <tiago.my...@gmail.com> wrote: >Hi Dmitry, > >On 6 April 2016 at 17:21, Dmitry Shachnev <mity...@debian.org> wrote: >> 1. Public (/usr/lib/python*/dist-packages) vs private (/usr/share/) >location >> depends on whether the module is intended to be used by third-party >packages, >> or only by grip itself. >> >> 2. The Style Guide doesn't *require* both Python 2 and 3. The Python >3 >> package is required, but add the Python 2 one only if you really need >it. >> >> 3. If you decide to ship files in a public location (dist-packages), >then >> the package having those files should be named python3-something, not >> just 'grip'. >> >> 4. Setuptools-generated entry points for public modules are fine, but >for >> private ones it's better to use your own ones or symlinks. >> >> Hope that answers your questions. > >Thanks for taking the time to explain me this, but actually I got a >little bit confused. Because yes, what you said is consistent with >what I found on articles about Python packaging on wiki.d.o[1][2], but >at the same time there are well-known packages in the archive that >contradicts this, specially the item "3". > >The package that I used as an example is tox. It used to be called >"python-tox", which is now a transitional dummy package[3]. Now is >named "tox"[4], because it is intended to be used as a CLI >application, but at the same time it ships its files in >"dist-packages"[5]. > >I followed the tox example and named the package "grip", not >"python-grip", because I'm standing on the shoulders of giants here. I >don't really know its maintainer, Barry Warsaw, but the guy has both >"@debian.org" and "@python.org" e-mail addresses[6], so he clearly >knows about Debian packaging and the Python ecosystem itself way more >than I do.
It's not always clear what to do. I have done packages that started with python{3}- that also ship scripts in /usr/bin if the module was the primary purpose of the package. I've also not used python{3}- for packages that have module in dist-packages when the /usr/bin script/application was the main point. In my opinion either can be correct depending on the primary purpose of the package. Scott K >The problem with the item number "4" is that I never got it working as >intended. So every time I have to create my own "/usr/bin/" scripts or >symlinks, discarding those auto-generated entry point scripts. > >Regards, >Tiago. > >[1]: https://wiki.debian.org/Python/LibraryStyleGuide >[2]: https://wiki.debian.org/Python/AppStyleGuide >[3]: https://packages.debian.org/sid/python-tox >[4]: https://packages.debian.org/sid/tox >[5]: https://packages.debian.org/sid/all/tox/filelist >[6]: https://qa.debian.org/developer.php?login=barry