Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Feb 2020 19:35:31 +1100
From:      Kubilay Kocak <koobs@FreeBSD.org>
To:        Alessandro Sagratini <ale_sagra@hotmail.com>, "freebsd-ports@freebsd.org" <freebsd-ports@freebsd.org>
Cc:        python <python@FreeBSD.org>
Subject:   Re: porting a python package with specific libraries versions as dependency
Message-ID:  <374606ab-0e5c-445a-7295-b3b9c08306f4@FreeBSD.org>
In-Reply-To: <DB7PR03MB47943A3CFF193B45F551C34F9EED0@DB7PR03MB4794.eurprd03.prod.outlook.com>
References:  <DB7PR03MB47943A3CFF193B45F551C34F9EED0@DB7PR03MB4794.eurprd03.prod.outlook.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?374606ab-0e5c-445a-7295-b3b9c08306f4>