Re: Python 2.7 – allow another db version beside 4.8

Joshua Root jmr at macports.org
Thu Jan 11 18:16:12 UTC 2018


On 2018-1-12 03:55 , Ken Cunningham wrote:
> 
> On 2018-01-11, at 12:28 AM, Jan Stary wrote:
>>
>>
>> Does anyone now? If my port requires (say) python (any python),
>> what is the right way to say that? (In some cases, having
>> /usr/bin/python is just fine.)
>>
> 
> MacPorts tries to undertake the principle of reproducible builds
> <https://reproducible-builds.org/>.
> 
> A port is built as much as possible the same way on every system and
> issues are more easily debugged. Specifying a fully determined version
> of python or perl helps to remove the issue of different versions
> building the software differently.
> 
> In the main, port submissions are required to have a fully spec'd
> version of python or perl for this reason -- a version that is verified
> to work correctly, and consistent across all builds. If you were
> managing a system of 20,000 ports and users of all different skill
> levels, you would eventually come to the same conclusion.
> 
> In simple cases, it might be allowed to slide.

Aiming for reproducible builds is certainly a consideration, but there
are more basic reasons why depending on "any python/perl" is a problem.

Does the port build differently depending on which interpreter version
is found? (This can include stuff like putting the path to a particular
version in shebang lines of scripts.) That's incompatible with
distributing prebuilt archives -- the "any version" on the buildbot
isn't necessarily the same as the "any version" on the user's system.

Does the port require one or more modules as well as the interpreter? If
so, you can't just have "any version" of a module and "any version" of
the interpreter; the versions of the two must match. Using python36 to
satisfy a python dependency and py35-numpy to satisfy a numpy dependency
isn't going to work.

Sometimes just using /usr/bin/python always may be fine. If not, and you
want to offer users a choice of which python version to use, then you
need to do it via variants.

- Josh


More information about the macports-dev mailing list