From owner-freebsd-python@freebsd.org Tue May 15 08:06:31 2018 Return-Path: Delivered-To: freebsd-python@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 8C889EE761F for ; Tue, 15 May 2018 08:06:31 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 221C784AAE for ; Tue, 15 May 2018 08:06:31 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id D6949EE761B; Tue, 15 May 2018 08:06:30 +0000 (UTC) Delivered-To: python@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 AED82EE761A; Tue, 15 May 2018 08:06:30 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pl0-x236.google.com (mail-pl0-x236.google.com [IPv6:2607:f8b0:400e:c01::236]) (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 2809784AAC; Tue, 15 May 2018 08:06:30 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mail-pl0-x236.google.com with SMTP id w19-v6so6337292plq.4; Tue, 15 May 2018 01:06:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:reply-to:subject:to:references:from:openpgp:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=MaqCNISKSNuTB/A+I6eJB4iOWmW9AUIfIQVcjCft7Lg=; b=ZyXW3XY0K4CRJDYEBZeVRz4JTetjCmbbxvD0pl/NzuZ9eNnAIR99PiFWOH7HOqAMEL xZi12plkJXgtGefPOANcZ6ayJs4FlI1cKOnIKq7b2+ZwAJxTNL3ieMxjX5KJsWwXDnux 4L7bjFgPOlsVxGi4JKUBSB+DxaZ7IImjH9rmnZXPhyLZe4r1ImsH3/uMWb/BSwUA8MTK pWlEuz/cQfYJ8k9cWXyPKXPpjc8a6eS8xXYLuL6YKSlhReGPwkPyIoDVX9AOk18Q3h3r vPbgzLVueCv9wZTKlQGYr9/qPBYAHleqGlPAYbJwZiQH44J1gHSsFT+WuxWYVNH9PxqU Z4Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:subject:to:references:from :openpgp:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=MaqCNISKSNuTB/A+I6eJB4iOWmW9AUIfIQVcjCft7Lg=; b=HznZG9hUr4J+xEEmmXy82JDhcOxKMk7+B4ihuguPeJltg5XTJACP3/WgcaRzBOf5tF tOy0828jkp54P2qGoaOYQJE/nOHdoqW3ensDAdCfcj7iPJnaYLyrq+mHBNVWVt4Hik15 o43d6139YeLE5DrWn6xqdzI69hWOzhqli0HXVP4Wc8G3/lmM6JVJW7GvDPXToq7kq1nI UNTiG31g0Miyd6YIntEm2hA8orJOCCgbWB29OWTvjYqERsm3xj5LqLLaJGd1XoZi/EfV XWJuVtM0eF5w8VyDzuPEsdc0A4Ifll37aQCZWq9Vgr1HAMg8nDVnREK78V307mH08NS4 l86w== X-Gm-Message-State: ALKqPwe/0NystiBWRq4bJiSmMLsmd8NeluOQec5eDS44M2e+si0LqbeB j8qHU9KzvntSLtDg7dyVNxWsXyFQ X-Google-Smtp-Source: AB8JxZqQ5SnVpAZsnjOeoqhWJRAvYxxrivzZIumXz0OSj0V1nS6IRPLTBTmcCJ+ygzaIE6B0eFBWsQ== X-Received: by 2002:a17:902:42e:: with SMTP id 43-v6mr13435187ple.365.1526371589099; Tue, 15 May 2018 01:06:29 -0700 (PDT) Received: from [192.168.1.102] (116.133.220.111.sta.wbroadband.net.au. [111.220.133.116]) by smtp.gmail.com with ESMTPSA id g68-v6sm21372286pfk.53.2018.05.15.01.06.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 01:06:28 -0700 (PDT) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: sysutils/ansible and FLAVOR (Python 3.6 support) To: Christopher Hall , FreeBSD Ports , python , Nikolai Lifanov References: <20180515150248.63b852a6@gmail.com> From: Kubilay Kocak Openpgp: preference=signencrypt Message-ID: <01e214e3-d119-3f50-ac34-6aad4cadc7bc@FreeBSD.org> Date: Tue, 15 May 2018 18:06:26 +1000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20180515150248.63b852a6@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2018 08:06:31 -0000 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) > 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