> On Jan 18, 2015, at 8:01 PM, Nick Coghlan <[email protected]> wrote: > > On 19 January 2015 at 06:35, Ben Finney <[email protected]> wrote: >> Donald Stufft <[email protected]> writes: >> >>>> On Jan 17, 2015, at 7:47 PM, Ben Finney <[email protected]> wrote: >>>> As it stands (‘python-daemon’ [0] version 2.0.3), the ‘version.py’ file >>>> is correctly included in the source distribution, correctly used by the >>>> ‘egg_info.writers’ entry point; but then ends up incorrectly installed >>>> to the run-time packages library. This causes problems for subsequent >>>> import of unrelated modules that happen to share the same name. >>>> >>>> How can I specify to Setuptools that the file is needed in the source >>>> distribution, is needed by the entry points for Setuptools, but should >>>> not be installed along with the binary distribution? >>> >>> setup_requires? >> >> Did you want to say anything else about that, for instance, how it >> applies to the question or what specifically you suggest I do? >> >> As it stands, I can only quote the documentation: >> >> setup_requires >> >> A string or list of strings specifying what other distributions need >> to be present in order for the setup script to run. […] >> >> <URL:https://setuptools.pypa.io/en/latest/setuptools.html> >> >> The module in question is part of the same code base, and is not an >> “other distribution”. So I don't know why you suggest this option. > > If you have a build/install time only dependency that you want to > distribute, you *have* to separate it out into a separate component if > you don't want it to also be present at runtime. We do not, and will > not, support selective installation of subcomponents, as it's too hard > to audit later. Instead, such components need to be separated out into > distinct packages so that the segmentation of functionality and > availability is clear to both the automated tools and to other humans. > > "Extras" work the same way - they select whether or not to install > optional *dependencies*, but deliberately can't be used to selectively > install pieces of the package itself (the affected subcomponents are > instead expected to do runtime checks to see if the optional > dependencies are present and provide a useful error message if they're > missing). >
I’m confused what this actually is. If it’s just a file you don’t want installed… then don’t specify it in your setup.py’s setup() function in either the py_modules or the packages keyword. --- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA _______________________________________________ Distutils-SIG maillist - [email protected] https://mail.python.org/mailman/listinfo/distutils-sig
