On 30. 10. 25 16:32, Yun Kwan Shek wrote:
When building dlib and related packages in the fedora build system, a check for 
sys.version_info < (3, 14) to ensure correct behavior of the way references are 
counted 
[links](https://docs.python.org/3.14/whatsnew/3.14.html#limited-c-api-changes), 
[links] (https://github.com/davisking/dlib/issues/3096), does not return the 
correct value.

Hi. Where exactly is this check? Could you show me the code? I looked into https://download.copr.fedorainfracloud.org/results/starfish/howdy-beta/fedora-43-x86_64/09748464-dlib/dlib.spec and found no such check in the spec.

I only found:

    requires: python <= 3.14

And that is a runtime dependency, nothing that would make the test pass during the build. A package would be built for Python 3.14 that requires python <= 3.14, which is redundant.

This can be seen in the build logs 
[here](https://download.copr.fedorainfracloud.org/results/starfish/howdy-beta/fedora-43-x86_64/09748464-dlib/builder-live.log.gz),
 where the behavior is identical to this [bug 
report](https://bugzilla.redhat.com/show_bug.cgi?id=2366197) that lead to the 
dlib package being orphaned.
*said behavior means that when the build is ran without mitigations in place, 
when using python 3.14.

Indeed. Yet where are the mitigations?

If one makes the behavior "always correct"(i.e. assume the build is always ran 
with Python 3.14 by removing the conditional), the build will complete correctly. 
Additionally, in the build logs, we can see that `mock.py version 6.5 starting (python 
version = 3.13.7 ...`

My questions are:
Whether way(s) to fix this in the COPR are possible;
and if so, how?

Depends on what you wan to do, but generally yes.

    %if v"0%{?python3_version}" >= v"3.14"

However note that the SRPMs in copr are built on different Fedora versions, so you should never use this to conditionally define patches, only to conditionally apply them.

See https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_do_not_conditionalize_sources

and if not, is there a way to detect build target in said python script and fix 
this issue?

Which Python script?

--
Miro Hrončok
--
Phone: +420777974800
Fedora Matrix: mhroncok

--
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
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/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to