Re: git: 8332894f1a6d - main - devel/py-os-brick: Fix python dependency version.

From: Kubilay Kocak <koobs_at_FreeBSD.org>
Date: Sun, 10 Oct 2021 22:45:53 UTC
On 7/10/2021 10:50 pm, Mikael Urankar wrote:
> The branch main has been updated by mikael:
> 
> URL: https://cgit.FreeBSD.org/ports/commit/?id=8332894f1a6d0c128476419235018ca4051b6b1d
> 
> commit 8332894f1a6d0c128476419235018ca4051b6b1d
> Author:     Mikael Urankar <mikael@FreeBSD.org>
> AuthorDate: 2021-10-07 11:47:01 +0000
> Commit:     Mikael Urankar <mikael@FreeBSD.org>
> CommitDate: 2021-10-07 11:50:40 +0000
> 
>      devel/py-os-brick: Fix python dependency version.
>      
>      py-pbr is at version 5.5.0.
>      
>      Build error:
>      py38-os-brick-5.0.0 depends on package: py38-pbr>=5.5.1 - not found
>      
>      Approved by:    portmgr (build fix blanket)
> ---
>   devel/py-os-brick/Makefile | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/devel/py-os-brick/Makefile b/devel/py-os-brick/Makefile
> index 48565419ce94..90b16f4cc483 100644
> --- a/devel/py-os-brick/Makefile
> +++ b/devel/py-os-brick/Makefile
> @@ -23,7 +23,7 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}eventlet>=0.30.1:net/py-eventlet@${PY_FLAVOR
>   		${PYTHON_PKGNAMEPREFIX}oslo.serialization>=4.1.0:devel/py-oslo.serialization@${PY_FLAVOR} \
>   		${PYTHON_PKGNAMEPREFIX}oslo.service>=2.5.0:devel/py-oslo.service@${PY_FLAVOR} \
>   		${PYTHON_PKGNAMEPREFIX}oslo.utils>=4.8.0:devel/py-oslo.utils@${PY_FLAVOR} \
> -		${PYTHON_PKGNAMEPREFIX}pbr>=5.5.1:devel/py-pbr@${PY_FLAVOR} \
> +		${PYTHON_PKGNAMEPREFIX}pbr>=5.5.0:devel/py-pbr@${PY_FLAVOR} \
>   		${PYTHON_PKGNAMEPREFIX}requests>=2.25.1:www/py-requests@${PY_FLAVOR} \
>   		${PYTHON_PKGNAMEPREFIX}tenacity>=6.3.1:devel/py-tenacity@${PY_FLAVOR}
>   
> 

Note that changing *_DEPENDS versions without actually patching what 
Python packages actually specify and check at runtime (setup.py, or 
requirements.txt *if* those are used in setup.py's) wont fix anything, 
and will remain broken at runtime.

In this case os-brick's setup.py specifies:

   setup_requires=['pbr>=2.0.0'],

And it looks like this port is matching RUN_DEPENDS to requirements.txt, 
which specifies >=5.5.1, but requirements.txt is not sourced or used by 
setuptools (or setup.py)

If os-brick actually *requires* 5.5.1 (uses something available only in 
5.5.1), then this package's RUN_DEPENDS is (was) correct and the 
setup.py should reflect that (not >=2.0.0).

If it doesn't require something only in 5.5.1, RUN_DEPENDS should match 
what is in setup.py, or whatever the actual minimum dependency 
requirement is.