On Fri, Dec 28, 2018 at 11:48 AM Neal Gompa <ngomp...@gmail.com> wrote:

> python-rpm-generators is not the real upstream for that code (rpm is).
> And testability would be a bit difficult because all the script does
> is pull stuff from python module metadata using setuptools and print it
> out.
>

So you provide test data either as external files or using the the mock
Python module. This is pretty standard.


> It's not going to exist in EPEL because in RHEL, the Python dependency
> generator doesn't exist at all. If we enabled it for EPEL, we'd have broken
> dependencies everywhere, since no RHEL Python modules would have the
> necessary generated dependencies. If you'd like to ask Red Hat to add it to
> RHEL 7, be my guest. However, I suspect they'll say no.
>

It doesn't need to be in the base, there just needs to be el6 and epel7
branches for python-rpm-generators and make it a dependency of
python-rpm-macros which is also an EPEL package. This is relatively
straightforward. The only difference from Fedora is maybe it should
probably be opt-in instead of enabled by default.

>
> A simple way to check if you should specify manually is to check if
> %__pythondist_requires is undefined, like so:
>
> %if ! %{defined __pythondist_requires}
> Requires: python3-modA
> Requires: python3-modB
> ...
> %endif
>

What is the point of this then if it requires additional logic and still
requires listing dependencies for EPEL? I'm happy to help with the changes
for EPEL, but I think if we're going to rely on this then it should at
least have tests.

Avram
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org

Reply via email to