Prevent python from automatically downloading dependencies

Kurt Hindenburg khindenburg at
Wed Nov 8 16:01:59 UTC 2017

> On Jun 25, 2017, at 1:52 AM, Joshua Root <jmr at> wrote:
> On 2017-6-25 12:27 , Ryan Schmidt wrote:
>> We often have this problem that we forget to specify dependencies in a python port. Python (setuptools?) helpfully automatically downloads a temporary copy of the dependency to use, so we may not notice this until committing the port, at which point if we're looking at the buildbot logs we might notice that it fails to build on older OS versions because of SSL problems.
>> Here's an example:
>> Is there a way we can tell python in the python portgroup that it should not attempt to automatically download dependencies, so that we would discover these problems earlier?
> According to the setuptools docs, easy_install at least has a --no-deps flag, and if that doesn't work, there's a --allow-hosts flag to which you can pass None to prevent all downloading. Someone would have to test whether these work when passed to as well.
> - Josh

i looked at this briefly.  I don’t think it is possible to pass easy_install options through setuptools.  The only way I could get it to work was to either 1) append to ports setup.cfg; 2) append/create system wide distutils.cfg.  Then you’d have to somehow revert upon failure/success.  I don’t see how this would work in practice.


allow_hosts = None

More information about the macports-dev mailing list