[Distutils] Python module for use in ‘setup.py’ but not to install

Nick Coghlan ncoghlan at gmail.com
Mon Jan 19 08:39:34 CET 2015

On 19 January 2015 at 11:59, Ben Finney <ben+python at benfinney.id.au> wrote:
> Nick Coghlan <ncoghlan at gmail.com> writes:
>> 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.
> So, to be clear: if this module is needed during build-time for the
> distribution but does not have a stable API yet, you're saying it
> nevertheless needs to go to a repository for download as an independent
> distribution?

I actually misunderstood your question. If you're just after the
ability to say "I want to include this file in the sdist, but not in
the built wheel file or installed distribution" (as I now believe you
are), then you're in the implementation defined world of the
significantly underspecified sdist format. I believe setting that up
actually *is* possible already, but have no idea what incantation
you'll need to pass to setuptools to make it do it (and the docs are
unlikely to be a reliable guide).

If you'd like to volunteer for the task of reverse engineering and
properly documenting how sdists work (with regression tests!), that
would be quite awesome. Not necessarily *fun* from your point of view,
but definitely awesome from my point of view :)


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Distutils-SIG mailing list