On Thu, Oct 19, 2017, at 07:09 PM, Donald Stufft wrote:
So heres a different idea that is a bit more ambitious but that I think is a better overall idea. Let entrypoints be a setuptools thing, and lets define some key lifecycle hooks during the installation of a package and some mechanism in the metadata to let other tools subscribe to those hooks.
I'd like to document the existing mechanism as previously suggested. Not least because I've already written the PR ;-). I don't think this needs to be controversial. They are a de-facto packaging standard, whether or not that's theoretically necessary. There's more than one tool that can create them (setuptools, flit), and more than one that can consume them (pkg_resources, entrypoints). Lots of packages use them, and they're not going anywhere soon. Describing the format properly seems like a clear win. For caching, I'm happy enough to work on a more general PEP to define packaging hooks, so long as that isn't going to be as long a discussion as PEP 517. Daniel:
How long does pkg_resources take to import for you folks?
About 0.5s on my laptop with an SSD, about 5s on a machine with a spinning hard drive. This is simulating a cold start on both; it's much quicker once the OS caches it in memory. Thomas