Date: Tue, 15 May 2018 16:55:14 +0800 From: Christopher Hall <christopherhall.hsw@gmail.com> To: Kubilay Kocak <koobs@FreeBSD.org> Cc: FreeBSD Ports <freebsd-ports@freebsd.org>, python <python@FreeBSD.org>, Nikolai Lifanov <lifanov@FreeBSD.org> Subject: Re: sysutils/ansible and FLAVOR (Python 3.6 support) Message-ID: <20180515165514.1a0e079b@gmail.com> In-Reply-To: <01e214e3-d119-3f50-ac34-6aad4cadc7bc@FreeBSD.org> References: <20180515150248.63b852a6@gmail.com> <01e214e3-d119-3f50-ac34-6aad4cadc7bc@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello Kubilay, On Tue, 15 May 2018 18:06:26 +1000, Kubilay Kocak <koobs@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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180515165514.1a0e079b>