[Bug 259981] devel/py-setuptools_scm: Fix incorrect *_DEPENDS, causing devel/py-pyparsing (and others) Fails to configure: The 'packaging>=20.0' distribution was not found

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 04 Dec 2021 22:05:11 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259981

--- Comment #6 from Stefan Eßer <se@FreeBSD.org> ---
I can confirm that py-setuptools_scm installed prevents building of other
Python ports, if py-packaging or py-pyparsing are not available.

But I do not see any issue when updating these ports with portmaster.

I have tested all permutations of port names in the following command:

# portmaster devel/py-pyparsing devel/py-packaging devel/py-setuptools_scm

And in all cases the re-installation succeeded (as would have a port upgrade):

===>>> The following actions were performed:
        Re-installation of py38-pyparsing-3.0.6
        Re-installation of py38-packaging-21.3
        Re-installation of py38-setuptools_scm-6.3.2

The dependency checks performed by portmaster are somewhat different from those
performed by a plain make, since portmaster plans all updates before starting
the first one.

But the updates are then performed in the same way as by a plain "make all
deinstall install" in the port directory.

Portmaster considers RUN_DEPENDS to actually mean that, i.e. a dependency that
has to be provided to run the program built by the port. This is different from
a plain "make", since that performs builds and installations of RUN_TIME
dependencies before starting the "stage" phase.

But this difference is irrelevant for this PR.


A solution to this issue might be to treat a missing py-pyparsing or
py-packaging in the same way as if py-setuptools_scm was not installed.

The huge majority of Python ports does not depend on py-setuptools_scm -
specifically py-packaging and py-pyparsing do not depend on it. (Of more than
7000 devel/py-* ports less than 70 directly depend on py-setuptools_scm.)

But if py-setuptools_scm *is* installed, a missing py-pyparsing oder
py-packages does suddenly become a configure dependency, since
py-setuptools_scm is (unnecessarily) invoked, but fails due to the missing
run-time dependency.

Thus, a missing py-pyparsing or py-packaging should not cause py-setuptools_scm
to fail in such a way, that setup.py is stopped. For ports that do not directly
depend on py-setuptools_scm, such a failure should be ignored.

-- 
You are receiving this mail because:
You are on the CC list for the bug.