Re: Disabling Python Dependency Generator Challenges

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 21. 12. 20 17:30, Georg Sauthoff wrote:
Hello,

I'm trying to build a fedora package for EPEL8 on Copr and I'm wondering
where its pikepdf dependency is coming from.

I conditionally disable the python dependency generator with a 0%{?epel}
guard
(cf.  https://github.com/gsauthof/copr-fedora/blob/c4bf0d2031b529e637d085a84837325dde36f1c2/python-img2pdf/python-img2pdf.spec#L62-L72 ):


     %if 0%{?epel} == 0
     # this is basically equivalent to adding Requires: for
     # pikepdf
     # pillow
     #
     # the generator is enabled by default, since f30 or so
     %{?python_enable_dependency_generator}
     %else
     %{?python_disable_dependency_generator}
     Requires:  python3-pillow
     %endif


The guard seems to work (because e.g. the in the same way disabled tests
aren't executed, as I can see from the build.log.

However, the final rpm package still depends on pikepdf:

     python3.6dist(pikepdf)

(cf. the end of https://download.copr.fedorainfracloud.org/results/gsauthof/fedora/epel-8-x86_64/01843500-python-img2pdf/build.log.gz )

Thus, it looks like disabling the dependency generator with the
python_disable_dependency_generator macro  didn't work?

Hello Georg,

It seems that the macro is not defined in EPEL 8 at all.

Fedora:
$ grep -r -A2 python_disable_dependency_generator /usr/lib/rpm
/usr/lib/rpm/macros.d/macros.python:%python_disable_dependency_generator() \
/usr/lib/rpm/macros.d/macros.python-%undefine __pythondist_requires \
/usr/lib/rpm/macros.d/macros.python-%{nil}

EPEL 8 mock:
# grep -r -A2 python_disable_dependency_generator /usr/lib/rpm
(nada)

As a workaround, you could do what the macro does on Fedora:

    %undefine __pythondist_requires

But we should get that macro introduced. The generators are owned by epel-rpm-macros, not RHEL's python*-rpm-macros, so the fix needs to be done there.

-----------------------

As a side note, I wonder why do you need to resort to disabling the automatic requires generator? If the dependency on pikepdf is bogus, work with upstream to remove it. In the mean time, sed/patch it out form upstream metadata in %prep.

It is: https://gitlab.mister-muffin.de/josch/img2pdf/blob/master/setup.py#L8

--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux