From owner-freebsd-ports@freebsd.org  Tue May 15 08:55:23 2018
Return-Path: <owner-freebsd-ports@freebsd.org>
Delivered-To: freebsd-ports@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3235BEEAA6C;
 Tue, 15 May 2018 08:55:23 +0000 (UTC)
 (envelope-from christopherhall.hsw@gmail.com)
Received: from mail-pf0-x235.google.com (mail-pf0-x235.google.com
 [IPv6:2607:f8b0:400e:c00::235])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 9F9A56E056;
 Tue, 15 May 2018 08:55:22 +0000 (UTC)
 (envelope-from christopherhall.hsw@gmail.com)
Received: by mail-pf0-x235.google.com with SMTP id e9-v6so7394433pfi.4;
 Tue, 15 May 2018 01:55:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=date:from:to:cc:subject:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=gaynd2hxdTteCWS0OU/Sh3arU6Jv6uBK4YZq4uTKm/w=;
 b=Lh8mBW9mWOl6LIJQSZaR3bwSxIpAOXNbtoTDy2LTLRbcZJXQ17u74pJrOl9AFHS36H
 unufdEEvFYC1lqHEpnDi/WLSVCDvH8l+pVEJ1+orESZN0+pP38E40PPTTOjDQbsCCJ69
 wkWV4svuGp45YftJIxNxrWsDnB459vNZ/Gz6Gw7iSgz74KIxgsiswPyFazT1IO1xv7X1
 keW+uSTbeHlfwg+/iRFVSSeiTsCcYfckXTZdo7ecfJ7sDrBmtv6JQg5yKjam4po08eOv
 mAANb+8JP/vwXM22ygPmXyEqnSEdPbhwgbRQytgfx3mLyivw2xDVEgtNzVD+w38/BvVt
 CkpA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=gaynd2hxdTteCWS0OU/Sh3arU6Jv6uBK4YZq4uTKm/w=;
 b=fa3TqIZzRWs10R65KOikeFDKTZLnVqm2GBN0VXlq36/xtJ8nxi+73deIucHtm4p4/2
 uv6p0jwwLBSWXRYW88puD8gc4HusKLE4/X463DDfEa2geTxCQG2pRzD7apBBVB+mftBd
 pXiUK1Dc+8oB71csfC5HKDF35SmGqXwDwwclObV1k+bUNavvafYNekTC1UhhHaGeCHAn
 a4VyDOVMzOwNvxcOdjWn8PBbxGtVpPlf2lSU+y0t3NObnLCepYLcS7syA1vPN+69r2MF
 yvOt8R5iwdY3mdXXHuLrptbt7nRJ1lI/JechkwnrOQZ2mbxdsFsyngCQdn9iEiZfQt2J
 VuIA==
X-Gm-Message-State: ALKqPwfe9l86lzI2mXE+jiT6AoSp9brRm5O7ethiM3yGwgcjeaNpMfEb
 HwVLOX0Tp9BnjwBQMH3XQdQPX5D2sqs=
X-Google-Smtp-Source: AB8JxZofyUo3z3e9UyaMhqGAkXs1Sz6QZwLoSlRn9TGqM7vZ8I9/Od7P8N67oS3SoOy4iC8nOA0DaQ==
X-Received: by 2002:a62:6304:: with SMTP id
 x4-v6mr14149941pfb.94.1526374521087; 
 Tue, 15 May 2018 01:55:21 -0700 (PDT)
Received: from localhost
 (2001-b030-2314-0200-f279-59ff-fe6a-4741.hinet-ip6.hinet.net.
 [2001:b030:2314:200:f279:59ff:fe6a:4741])
 by smtp.gmail.com with ESMTPSA id d4-v6sm24147661pfl.24.2018.05.15.01.55.19
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Tue, 15 May 2018 01:55:20 -0700 (PDT)
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>
X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; amd64-portbld-freebsd12.0)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-BeenThere: freebsd-ports@freebsd.org
X-Mailman-Version: 2.1.26
Precedence: list
List-Id: Porting software to FreeBSD <freebsd-ports.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-ports>,
 <mailto:freebsd-ports-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-ports/>
List-Post: <mailto:freebsd-ports@freebsd.org>
List-Help: <mailto:freebsd-ports-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-ports>,
 <mailto:freebsd-ports-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 15 May 2018 08:55:23 -0000

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.