> On Nov 8, 2017, at 9:41 PM, Kurt Hindenburg <[email protected]> wrote: > > > >> On Nov 8, 2017, at 12:13 PM, Rainer Müller <[email protected]> wrote: >> >> On 2017-11-08 17:32, Ryan Schmidt wrote: >>> >>> On Nov 8, 2017, at 08:24, Kurt Hindenburg wrote: >>> >>>> On Jun 25, 2017, at 1:52 AM, Joshua Root 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: >>>>>> https://build.macports.org/builders/ports-10.7_x86_64_legacy-builder/builds/37372 >>>>>> 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 setup.py 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. >>>> >>>> Kurt >>>> >>>> [easy_install] >>>> allow_hosts = None >>> >>> These two lines are what would be appended to either of those files? What >>> problems do you foresee if we would have the python portgroup automatically >>> append those lines to the port's setup.cfg? >> >> Could we place this into ${workdir}/.home/.pydistutils.cfg, which is in >> the HOME for the macports user? As I understand the documentation linked >> below, this file should be read by default. This could be done >> unconditionally instead of editing the source files of the port. >> >> https://docs.python.org/2/install/index.html#location-and-names-of-config-files >> >> Rainer > > Ok, I didn’t realize ${workdir}/.home would be used. It works as expected if > the 2 lines are in that file. Also note that the errors are verbose and > perhaps not clear to the user what the issue is. > I’ll see about putting the code in the python PG and create a pull request > for comments. > https://github.com/macports/macports-ports/pull/1016 <https://github.com/macports/macports-ports/pull/1016>
> Thanks > Kurt >
