On 23 February 2017 at 13:04, Freddy Rietdijk <freddyrietd...@fridh.nl> wrote: >> Here's an example I've just run into that involves a == dependency on >> a public package: I have a library that needs to access some C API >> calls on Windows, but not on other platforms. The natural way to do >> this is to split out the CFFI code into its own package, >> _mylib_windows_helper or whatever, that has zero public interface, and >> have mylib v1.2.3 require "_mylib_windows_helper==1.2.3; os_name == >> 'nt '". > > You have a public library, that, depending on the platform, depends on a > public (helper) library that has no public interface? That doesn't sound > good to me. If you don't want to implement a public interface then it should > just be included in the main library because it is in the end a requirement > of the library. It's a pity you can't have a universal wheel but so be it. > Choosing to depend on an exact version of a package that has no public > interfance is in my opinion the wrong solution.
The helper library is only public in the sense that it's published on PyPI. I'd describe it as an optional helper. If PyPI had a way of marking such libraries as "only allow downloading to satisfy a dependency" then I'd say mark it that way - but we don't. Requiring non-universal (and consequently version-dependent) wheels for platforms that don't need them seems like a cure that's worse than the disease. Personally, I find Nathaniel's example to be a compelling reason for wanting to specify exact dependencies for something that's not an "application". As an author, it's how I'd prefer to bundle a package like this. And IMO, if distributions prefer that I don't do that, I'd say it's up to them to explain what they want me to do, and how it'll benefit me and my direct users. At the moment all I'm seeing is "you should" and "it's the wrong solution" - you may be right, but surely it's obvious that you need to explain*why* your view is correct? Or at a minimum, if there is no direct benefit to me, why I, as an author, should modify my preferred development model to make things easier for you. Not all packages published on PyPI need or want to be bundled into OS distributions[1]. Paul [1] OTOH, the bulk of this discussion is currently about theoretical cases anyway. Maybe it would be worth everyone (myself included) taking a deep breath, and refocusing on actual cases where there is a problem right now (I don't know if anyone can identify such cases - I know I can't). Asking directly of the authors of such packages "would you be OK with the following proposal" would likely be very enlightening. _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig