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

Carl Meyer carl at oddbird.net
Mon Jan 19 19:03:22 CET 2015


On 01/19/2015 01:23 AM, Ben Finney wrote:
[snip]
> My understanding, based on an answer received elsewhere [0], is that
> omitting the file from ‘setup.py’ but adding it to ‘MANIFEST.in’ causes
> it to be included in the sdist but omitted from install targets.
> 
> [0] <URL:http://stackoverflow.com/questions/27930124/python-module-use-during-setup-but-not-to-be-installed/27931088#27931088>
> 
> That has worked for me. But it appears to cause problems for some
> others, related to this module which should not be installed.

That's the right answer.

> Unfortunately this kind of problem (trouble post-install from a PyPI
> package) is difficult to test. How can I test the behaviour of ‘pip’ in
> this regard, without thrashing many releases of a package upload to
> PyPI?

Pip can install from the filesystem just as well as from PyPI. Run
"python setup.py sdist" to generate your sdist file, and then run "pip
install path/to/generated/sdist.tar.gz".

Carl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20150119/936cdfc3/attachment.sig>


More information about the Distutils-SIG mailing list