samba48 port - build against python36?

I am trying again to switch my installed ports over to Python 3.6 as it was changed to be the default version in April. For most ports it is a simple case of doing # portupgrade -f <portname>. I have a few ports that simply don't work with Python 3 - security/cfv, security/denyhosts and devel/scons, but I would have expected net/samba48 to be python3-aware. And in fact the samba 4.8 release notes say that it has been aware since 4.8.0rc3. So this would seem to be a FreeBSD-ism and not some characteristic of samba 4.8 itself. /usr/ports/net/samba48/Makefile has explicit references to Python 2.7, which would seem to confirm that.

The /usr/ports/UPDATING entry for the Python default version change just says that the default changed and does not offer any advice for actually updating ports to use the new default version.

If anyone has managed to build samba 4.8 with Python 3 (and no dependency on any Python 2 ports), I'd appreciate hearing what the method is to accomplish that.
 
The /usr/ports/UPDATING entry for the Python default version change just says that the default changed and does not offer any advice for actually updating ports to use the new default version.
The default only changed for ports that request a Python version. For example:
Code:
USES= python

This port however asks for a specific version:
Code:
USES+=                          python:2.7

It's the port maintainers job to check and update the port if necessary. And although the default Python version has been changed to 3.6, the old Python 2.7 is still supported until 2020 at least. So there's plenty of time of port maintainers to update their ports and move to 3.6.

 
This port however asks for a specific version:
Code:
USES+=                          python:2.7
Correct. Most ports do that because the upstream requires a specific version. According to the samba 4.8 changelog, samba 4.8 works with either Python 2 or 3. So this is apparently an issue with the port (if I'm not doing something wrong). The https://www.freebsd.org/cgi/ports.cgi?query=samba48 page lists a bunch of Python 2.7 dependencies, but also 3.6 dependencies. Since I know that the samba48 ports builds against a system with 2.7 only, I was hoping that it would also build against a system with 3.6 only..
It's the port maintainers job to check and update the port if necessary. And although the default Python version has been changed to 3.6, the old Python 2.7 is still supported until 2020 at least. So there's plenty of time of port maintainers to update their ports and move to 3.6.
Indeed. I just don't want to have 2 versions of Python and all of the Python dependencies required by loads of packages. I was perfectly fine staying with Python 2.7 via the method shown in UPDATING, except that a number of ports that have newer versions available require Python 3.6. In particular, the whole ninja / gobject-introspection / meson dependency.

I was able to get my system down to needing Python for only:
Code:
        samba48-4.8.12_4
        cfv-1.18.3_1
        denyhosts-2.6_7

With dependencies of:
Code:
        python27-2.7.16_1
        py27-iso8601-0.1.12
        py27-setuptools-41.0.1
        py27-dnspython-1.16.0

The list used to be a good deal longer, but I developed patches for a bunch of ports that were marked as needing 2.7 and submitted PR's on them.

I had (mistakenly) assumed that since samba48 was a heavily-used port and the upstream has supported Python 3.6 for quite a long time, combined with the port dependencies listing Python 3.6, that I might have been doing something wrong.

I'll investigate what the Python issue is in the port scaffolding and hopefully fix it. In either case, I'll submit a PR against samba48 once I've done that research.
 
I'll investigate what the Python issue is in the port scaffolding and hopefully fix it. In either case, I'll submit a PR against samba48 once I've done that research.
If this was a PR, its status would be "Overcome by events" :)

As Samba 4.8 will likely go EoL upstream next month (reference), I have switched to Samba 4.10 (4.10.7 just landed in the ports tree a little while ago). That version no longer requires Python 2.7.
 
Back
Top