porting a python package with specific libraries versions as dependency

Kubilay Kocak koobs at FreeBSD.org
Tue Feb 25 08:35:41 UTC 2020


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 at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscribe at 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


More information about the freebsd-ports mailing list