From owner-freebsd-python@freebsd.org  Tue Feb 25 08:35:42 2020
Return-Path: <owner-freebsd-python@freebsd.org>
Delivered-To: freebsd-python@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 717FD254A6B
 for <freebsd-python@mailman.nyi.freebsd.org>;
 Tue, 25 Feb 2020 08:35:42 +0000 (UTC)
 (envelope-from koobs.freebsd@gmail.com)
Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3])
 by mx1.freebsd.org (Postfix) with ESMTP id 48RXM14dv4z3Lcl
 for <freebsd-python@freebsd.org>; Tue, 25 Feb 2020 08:35:41 +0000 (UTC)
 (envelope-from koobs.freebsd@gmail.com)
Received: by mailman.nyi.freebsd.org (Postfix)
 id 38682254A68; Tue, 25 Feb 2020 08:35:41 +0000 (UTC)
Delivered-To: python@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2AF64254A67;
 Tue, 25 Feb 2020 08:35:41 +0000 (UTC)
 (envelope-from koobs.freebsd@gmail.com)
Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com
 [IPv6:2607:f8b0:4864:20::541])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 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 48RXLy1VkYz3LV8;
 Tue, 25 Feb 2020 08:35:37 +0000 (UTC)
 (envelope-from koobs.freebsd@gmail.com)
Received: by mail-pg1-x541.google.com with SMTP id j4so6534837pgi.1;
 Tue, 25 Feb 2020 00:35:37 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:reply-to:subject:to:references:cc:from:message-id:date
 :user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=+jxXj1B3yRaV4DJ3uVv+Wj8tdt+NsbAjzyb56JQPlus=;
 b=cjZ75Pg99JjrXJGRCOHzdNsu+7Uy3K5iaa/mrMYAK4MstXLHsUKC0xDLlicmlTDtnM
 1WfGFc2aH/A6FhXjhY56tSCAP6HINMMbq6DRa14qNFB/bRX4uULDk471y0x/C48SjlUv
 bCO1ZRwG2HF4ZFO+hw+ly9Q5+eFWr959KplvxFRZaUuiju/MSXvISgTKCilrZmD2e+9v
 JIDbQlti5rChdh8XCvyWmJek2+kJeiiO1GSgTo0ONq5BpnrKhZCBTkgHdzCDG4iitHCZ
 xvGR4Mz3XAzcuYUw79wok8VnyUYSYiw/p87QkafXcSF2QSjrKNKJ/oFIxRCVpqNBqfW9
 3eoQ==
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:cc:from
 :message-id:date:user-agent:mime-version:in-reply-to
 :content-language:content-transfer-encoding;
 bh=+jxXj1B3yRaV4DJ3uVv+Wj8tdt+NsbAjzyb56JQPlus=;
 b=ELVW1J++dB/9MZ4BDv4cTncOsNF0t9pTUPLTv62b6fA88gbi+YBTj6ij2qAAOXarrH
 wpotLlb8BIgYb0LANWXJtoZU8nnelMNiQl7JvLJMiAN7UB9rC1rvTY2HwTK7T12gk3/T
 eYmHickQTeoJZZtmB8yyX9MsvcM/RvABtlvqu0ENqR683fdgkTqDt+BkwcvuGAEZSqnW
 pm5ibAhEmZ5QE8EQVMPVf4CcOxHOmgBnkyHZG3LC42j9mkAFb//KKOdklN/1gczQYdv9
 3ztLZso7wXxi8pFXclhF/tvPpdblBWmi7+ycVwKLdCo68mcO1IURHBC/5edpkLKCMvVj
 1jAw==
X-Gm-Message-State: APjAAAXejCPXSSs4xhGDJY8/35dc83fkEbNunV5r6+MfamRzpOcmzpr0
 qrw7psW8V26kwTJKO1mOmiMk25xo
X-Google-Smtp-Source: APXvYqzui4s9Jy90Ze/l4+pj8lBZ80gCkZi5auakP9qA0TyVl6Vo7p75BnRZYSn4Z7TssI50UIeu9w==
X-Received: by 2002:a63:564d:: with SMTP id g13mr29098713pgm.157.1582619735699; 
 Tue, 25 Feb 2020 00:35:35 -0800 (PST)
Received: from ?IPv6:2403:5800:7100:5d01:e185:676f:5fdf:adda?
 (2403-5800-7100-5d01-e185-676f-5fdf-adda.ip6.aussiebb.net.
 [2403:5800:7100:5d01:e185:676f:5fdf:adda])
 by smtp.gmail.com with ESMTPSA id q25sm16160074pfg.41.2020.02.25.00.35.34
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 25 Feb 2020 00:35:35 -0800 (PST)
Sender: Kubilay Kocak <koobs.freebsd@gmail.com>
Reply-To: koobs@FreeBSD.org
Subject: Re: porting a python package with specific libraries versions as
 dependency
To: Alessandro Sagratini <ale_sagra@hotmail.com>,
 "freebsd-ports@freebsd.org" <freebsd-ports@freebsd.org>
References: <DB7PR03MB47943A3CFF193B45F551C34F9EED0@DB7PR03MB4794.eurprd03.prod.outlook.com>
Cc: python <python@FreeBSD.org>
From: Kubilay Kocak <koobs@FreeBSD.org>
Message-ID: <374606ab-0e5c-445a-7295-b3b9c08306f4@FreeBSD.org>
Date: Tue, 25 Feb 2020 19:35:31 +1100
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101
 Thunderbird/74.0
MIME-Version: 1.0
In-Reply-To: <DB7PR03MB47943A3CFF193B45F551C34F9EED0@DB7PR03MB4794.eurprd03.prod.outlook.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Rspamd-Queue-Id: 48RXLy1VkYz3LV8
X-Spamd-Bar: ---
Authentication-Results: mx1.freebsd.org;
 dkim=pass header.d=gmail.com header.s=20161025 header.b=cjZ75Pg9;
 dmarc=none;
 spf=pass (mx1.freebsd.org: domain of koobsfreebsd@gmail.com designates
 2607:f8b0:4864:20::541 as permitted sender)
 smtp.mailfrom=koobsfreebsd@gmail.com
X-Spamd-Result: default: False [-3.05 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[];
 RCVD_VIA_SMTP_AUTH(0.00)[];
 HAS_REPLYTO(0.00)[koobs@FreeBSD.org]; TO_DN_SOME(0.00)[];
 R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36];
 REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3];
 DKIM_TRACE(0.00)[gmail.com:+];
 FORGED_SENDER(0.30)[koobs@FreeBSD.org,koobsfreebsd@gmail.com];
 FREEMAIL_TO(0.00)[hotmail.com]; MIME_TRACE(0.00)[0:+];
 FREEMAIL_ENVFROM(0.00)[gmail.com];
 ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US];
 FROM_NEQ_ENVFROM(0.00)[koobs@FreeBSD.org,koobsfreebsd@gmail.com];
 MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; TAGGED_FROM(0.00)[];
 FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain];
 DMARC_NA(0.00)[FreeBSD.org]; TO_MATCH_ENVRCPT_SOME(0.00)[];
 RCVD_IN_DNSWL_NONE(0.00)[1.4.5.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org
 : 127.0.5.0]; 
 IP_SCORE(-0.85)[ip: (-0.63), ipnet: 2607:f8b0::/32(-1.88), asn: 15169(-1.67),
 country: US(-0.05)]; RCVD_TLS_ALL(0.00)[]
X-BeenThere: freebsd-python@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: FreeBSD-specific Python issues <freebsd-python.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-python>, 
 <mailto:freebsd-python-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-python/>
List-Post: <mailto:freebsd-python@freebsd.org>
List-Help: <mailto:freebsd-python-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-python>,
 <mailto:freebsd-python-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Feb 2020 08:35:42 -0000

On 25/02/2020 7:22 pm, Alessandro Sagratini wrote:
> Hello all,
> I was discussing [1] about porting oci-cli to ports tree. It is a python package, that should not be a big deal, though, investigating a bit more "requires" field in setup.py [2], I noticed it depends on specific python libraries, for example oci-sdk 2.10.5, configparser 3.5.0 or six 1.11.0.
> 
> What is the official FreeBSD packaging policy with regards to such python packages? What about installing something in a virtualenv?
> 
> [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244224
> [2] https://github.com/oracle/oci-cli/blob/master/setup.py
> 
> Let me know if you need anything else from me.
> Thank you,
> Alessandro
> 
> _______________________________________________
> freebsd-ports@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org"
> 

Hi Allesandro

I recently expanded on the existing Python Policy with regard to 
dependencies, including what to do with == dependencies.

https://wiki.freebsd.org/Python/PortsPolicy#Dependencies

The tldr is, == dependencies are not suitable for "packaging", they are 
suitable for "deployments".

To port these packages, they should be updated to >= counterparts (patch 
the setup.py, or source file for those dependencies).

Unfortunately this requires additional QA to do properly, as upstream 
may not have or be currently testing with later versions, and the 
versions of dependencies in the ports tree can be updated at any time.

This is why the vast majority of correctly packaged (upstream) packages 
use >= dependencies, leaving the x.y.z version specified as the 'lowest 
supported version' to allow flexibility.

Setting *_requires to ">=" upstream, does not prevent upstreams from 
testing specific versions themselves for their test environment, but its 
recommended they QA what they distribute, which ensures issues in newer 
versions of their dependencies are picked up early and often, *before* 
being released to users.

If you need more help or have questions regarding porting Python 
packages, jump on #freebsd-python on freenode IRC and we'll be happy to 
assist.


./koobs