From nobody Fri Aug 20 00:30:32 2021 X-Original-To: python@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 415C81778AF1; Fri, 20 Aug 2021 00:30:37 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GrMx90sRhz4X5v; Fri, 20 Aug 2021 00:30:37 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mail-pl1-x633.google.com with SMTP id x1so2402370plg.10; Thu, 19 Aug 2021 17:30:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:message-id:date:mime-version:user-agent:reply-to:subject :content-language:to:references:cc:from:in-reply-to :content-transfer-encoding; bh=inM5Fg5erVA/G52ezEV2eWSTezpIIsERr6zlJ7jtdlE=; b=D172twBe0tXgJeG201H4hdTAB0j/U4SI8SC1HHNmrykyvWE+13wZ7aWrLi8JbVCblN Wf8irJjjTW5bDLzsmqXjf01KrsV2P/jhQMlVROBlv1UazPEdwVArcXPMsjWfqDAfxS5H PUcv8lP+bpEo+oGeAys1aiSiR1CqiAQrV2gh8pw9y73LNZu0H1UW3tzNmHMJhyUlaWeY Yksd+m1ekCgZKA2s0tpk8oSJMwQEOkS1rmVAiI2L0g+SzQrSfeFJeSjZvJUdA8KzBea8 QR7KK9nVKoydZ0rb7l9bIU19Yj7N26CRZJpjkounrnT4dA+A4NguBU09a3xLa60qXiqp jnJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :reply-to:subject:content-language:to:references:cc:from:in-reply-to :content-transfer-encoding; bh=inM5Fg5erVA/G52ezEV2eWSTezpIIsERr6zlJ7jtdlE=; b=XJBEOXSsutEqLVFKO/WdjjSVCKdeuS01tOMVKX1hVO9qaXFKi2S7auraC6TTNyy0ik oyP2pcq3RSGG+Xmqx7/vcs+HZyuhuARkpZKIe4A6dm8+rsbZ1mNT29Tiwj9IhMgAuRHo BJ8i3NOeDousO5OZlIWyowoLZ/CdWZHHENzYPhtpRQR08y+1cWr9sVlIfk7N3xTUhkqx dbr/IBWcF0eG0KGzIC7ONjfZ1sv5ejpJLdPheR6ptECKwIhBqyG5ew+aTajFKlxrqPDb Ky0WLhbXe3IYAwiNCqM4aEwKQ34LL3aq8Rj/JikwtCHO/iEhTQbyrDGYhyekpVX7M2nj Vw3Q== X-Gm-Message-State: AOAM532oAGBLsGreaKjtkHEBef13HfYUINhZYO2E86nJZUO9/tDTL3op gpxqCFdPDuyms9immSP8eG0= X-Google-Smtp-Source: ABdhPJxt8roexM+22l9ykUY0Mflbrg6Dk2JxY1w3/Wn90v6wjZOIRtRwwCIh5EQCKl5hMLnwE9JjKQ== X-Received: by 2002:a17:902:9008:b0:12d:8258:e07c with SMTP id a8-20020a170902900800b0012d8258e07cmr14378521plp.42.1629419436013; Thu, 19 Aug 2021 17:30:36 -0700 (PDT) Received: from ?IPV6:2403:5800:7500:3601:f40c:b688:df45:60? (2403-5800-7500-3601-f40c-b688-df45-60.ip6.aussiebb.net. [2403:5800:7500:3601:f40c:b688:df45:60]) by smtp.gmail.com with UTF8SMTPSA id y4sm4288368pjw.57.2021.08.19.17.30.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Aug 2021 17:30:35 -0700 (PDT) Message-ID: Date: Fri, 20 Aug 2021 10:30:32 +1000 List-Id: FreeBSD-specific Python issues List-Archive: https://lists.freebsd.org/archives/freebsd-python List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-python@freebsd.org X-BeenThere: freebsd-python@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Thunderbird/93.0a1 Reply-To: koobs@FreeBSD.org Subject: Re: How do I depend on a python port without caring about flavor Content-Language: en-US To: Tatsuki Makino , Mel Pilgrim References: <891c5f92-0859-dafc-3356-2d2a08fcfc3c@bluerosetech.com> Cc: freebsd-ports@freebsd.org, python From: Kubilay Kocak In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4GrMx90sRhz4X5v X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On 20/08/2021 7:07 am, Tatsuki Makino wrote: > I also want to know the official way :) > > I think the following ports are strange for python. > > devel/llvm{-devel,12,11,10,90,80,70} > databases/rrdtool > graphics/opencv > and astro/geographiclib (which are maintained by me :) ) > > They do not seem to be able to support non-default versions of python. > So they are not transparent to FLAVOR, even if they are libraries. > > I am thinking of the following changes for the next version of astro/geographiclib. > > - sphinx-build:textproc/py-sphinx > + ${PYTHON_PKGNAMEPREFIX}sphinx>=0:textproc/py-sphinx@${PY_FLAVOR} > > If there is python:env in variable USES, it seems that variables such as PY_FLAVOR will be present. > > ... So, I'm not sure, what should I do? :) > > Regards. > > Yep so: *_DEPENDS=${PYTHONPKGNAMEPREFIX}foo:port/origin@${PY_FLAVOR} Is the correct method, in which PY_FLAVOR gets derived from DEFAULT_VERSIONS, following the frameworks default versions over time, and honoring user default preferences and selection. With USES=python:env to bring in the relevant variables for use. One just needs to *also* make sure that for any scripts provided in the dependent port, they use ${PYTHON_CMD} for shebangs, etc, rather than env python env python2, env python3, who's targets change over time (depending on the default version)