how do you prevent distutils from downloading and building packages without consent?

lkcl luke.leighton at googlemail.com
Thu Mar 26 11:59:15 CET 2009


folks, hi,

a number of people using pyjamas are not only encountering
difficulties with setup.py endeavouring to download and install
"setuptools" but also they are ... the best word to use is
unfortunately "offended" - by the fact that distutils, in its default
configuration, downloads and even _compiles_ its dependencies -
*without consent*.

a copy of the setup.py can be found here:
http://pyjamas.svn.sourceforge.net/viewvc/pyjamas/trunk/setup.py

this alarming situation has shown to occur on windows, ubuntu and
debian.  personally, i used setup.py to install pyjamas on a debian
system: as i happened not to have python-setuptools installed, i was
alarmed to find that setup.py, thanks to distutils, was not only
downloading but also attempting to _compile_ setuptools.  fortunately,
the compile actually failed.

windows users have also reported similar failures (presumably because
the do not have a suitable build environment, involving downloading
and installing a proprietary c compiler) and have also expressed their
displeasure at not being consulted as to which bits of software are
going to get thrown onto their system without their permission.

so it should be fairly clear as to why it is unacceptable for this to
occur.

the question is: how can it be stopped?  what option, in distutils
"terminology", tells distutils "please simply tells users that a
package is missing, providing them with sufficient information such
that they can rectify the missing dependency in a manner which is
satisfactory _to them_?

answers and guidance greatly appreciated, including telling me that
i've made a simple mistake in the setup.py, linked above.

l.



More information about the Python-list mailing list