Hello Kubilay, On Tue, 15 May 2018 18:06:26 +1000, Kubilay Kocak <ko...@freebsd.org> wrote:
> On 15/05/2018 5:02 pm, Christopher Hall wrote: > > Hello everyone, > > Hi Christopher, > > > I am looking at which is the best way to modify the sysutils/ansible > > port so that it will use Python3.6. Currently it has the "noflavors" > > option in the USE_PYTHON line son only a single packages with > > Python2.7 exists in the pkg repo. > > tldr: Add PYTHON_PKGNAMEPREFIX to the port if you want to produce a > py3x version of the port. If you/we/users also want it from the > official package repositories, remove noflavors. > > > Should it be renamed to sysutils/py-ansible and "noflavors" removed? > > To produce both py27-ansible and py36-ansible packages in repo, > > allowing a choice of Python version > > The name of the directory is less relevant than whether a/the port > uses PYTHON_PKGNAMEPREFIX (to differentiate package names when built > with/for different Python versions. The current ansible port doesn't > do this and it should (since it correctly allows all python versions > with USES=python, without qualification) Thanks for this, I put a patch in: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228268 > > > Alternatively, is it better to keep the name as sysutils/ansible and > > just change the "USES=python" to "USES=python:3.6+". However this > > would make it a Python3 only package. > > > > Any suggestions as to which approach would be preferable? > > The Python team recommends that if a Python package supports multiple > Python versions (ansible does), then the port should reflect that and > not force one version or another, and use PYTHON_PKGNAMEPREFIX. This > includes Python packages supporting 2 & 3, and forcing 3.x or the > reverse, forcing 2.x. > > This at *least* allows a user to select which version of the > port/package they want, using DEFAULT_VERSIONS overrides. > > Separately, on the multiple flavours/package creation question in the > official package repositories, we also recommend that noflavors only > be used in the *very* rare cases where it is *entirely* irrelevant > which Python version is used, and where there isn't any value > *whatsoever* in having multiple packages, say if a user wants to > transition between using a 2.x version to 3.x on their own time at > their own pace. > > tldr, for maintainers: > > - User choice should not be removed/precluded > - Be declarative, not imperative for Python ports/packages > - If it supports > 1 Python versions (any combination), use > PYTHON_PKGNAMEPREFIX -- Best Regards. Christopher Hall. _______________________________________________ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"