Tuesday, March 11, 2025

%pyproject_buildrequires -t/-e and %tox without a suitable tox configuration will error

Hello packagers.

As a followup to this email sent a month ago to the python-devel list, I now
plan to make the incorrect (and unsafe) usage of %pyproject_buildrequires -t/-e
and %tox without a suitable tox configuration fail the build.

This is a breaking change, but I believe it's the only way to prevent packages
with always passing %checks.

If your package has no tox configuration, do not use the -t/-e option for
%pyproject_buildrequires, do not use %tox.

This change will land to rawhide first and later to all stable releases as well.

For reference:
https://src.fedoraproject.org/rpms/pyproject-rpm-macros/pull-request/512

On 05. 02. 25 10:47, Miro Hrončok wrote:
> Hello Pythonistas.
>
> When we updated tox from version 3 to 4, it no longer fails when here is no
> suitable tox configuration found. This was a deliberate upstream choice.
>
> Unfortunately, it means that packages that use %pyproject_buildrequires with -t
> or -e now silently succeed if there is no tox configuration found.
>
> I identified 95 packages that are affected by this, see below.
>
> Unfortunately, it is tricky to detect a missing tox configuration directly from
> %pyproject_buildrequires. For now, I did this by looking for a specific
> information in tox output, but that might not be stable.
>
> I built all Rawhide packages matching %\{?pyproject_buildrequires\s+(.+\s)?-
> \S*[te] in a copr with a modified version of %pyproject_buildrequires which
> fails when this happens.
>
> https://copr.fedorainfracloud.org/coprs/churchyard/pyproject-buildrequires-no-
> tox-error/builds/
>
> For all the failures, I looked into the logs and identified the 95 failures are
> caused by that (see below).
>
>
> If this affects your package, please consider if your usage of -t/-e for
> %pyproject_buildrequires is a mistake (and remove it), or see if some explicit
> build dependencies are missing (and the package only builds by chance).
>
> Sometimes, upstreams which use tox don't put their tox configuration into sdist
> (%pypi_source) and only keep it in git.
>
> Sometimes, upstreams don't use tox at all and the usage of -t/-e is wrong.
>
> If you have questions, I am happy to help.
>
> Maintainers by package:
> hddfancontrol        filiperosset
> lazygal              rathann
> mat2                 atim
> mkdocs               dcavalca smani
> mogui                xdelaruelle
> onnx                 aalvarez dherrera
> past-time            fab
> patool               eclipseo
> pmbootstrap          defolos
> pykka                girst
> python-ailment       fab mikep
> python-aioftp        fab
> python-aiomultiprocess fab
> python-archinfo      fab mikep
> python-archspec      orion
> python-asn1tools     peter
> python-asysocks      fab
> python-base58        peter
> python-blowfish      limb
> python-ckzg          peter
> python-claripy       fab mikep
> python-cmd2          fab jcapitao ktdreyer
> python-dataclassy    peter
> python-diff-match-patch amigadave
> python-dropbox       limb
> python-einops        trix
> python-envisage      orion
> python-eth-abi       peter
> python-eth-account   peter
> python-eth-event     peter
> python-eth-hash      peter
> python-eth-keyfile   peter
> python-eth-keys      peter
> python-eth-rlp       peter
> python-eth-stdlib    peter
> python-eth-typing    peter
> python-eth-utils     peter
> python-flask-httpauth jpena
> python-flask-session frantisekz
> python-haversion     fab
> python-hexbytes      peter
> python-hvac          ignatenkobrain ngompa rcallicotte
> python-influxdb-client fedepell stevetraylen
> python-jaconv        kevin
> python-jsonpath-ng   fab
> python-lazy_load     peter
> python-libusb1       jonny peter
> python-logutils      limb
> python-lru-dict      peter
> python-mailman-web   salimma
> python-migen         somlo
> python-morphys       peter
> python-multiaddr     peter
> python-multibase     peter
> python-multicodec    peter
> python-multihash     peter
> python-music21       zbyszek
> python-nine          ondrejj
> python-optking       jussilehtola
> python-optuna        limb
> python-paginate      dcavalca
> python-pandas-datareader sergiopr
> python-pyaes         thebeanogamer
> python-pybeam        peter
> python-pyiqvia       fab
> python-pymongo       apevec cstratak hhorak jonathanspw orion
> python-pyrad         antorres cicku peter
> python-pytest-dependency mikelo2
> python-pytest-fixture-config kevin
> python-qcelemental   jussilehtola
> python-requests-unixsocket jcaratzas radez
> python-rlp           peter
> python-rpyc          fab
> python-simple-pid    ttorcz
> python-smi           fab
> python-ssdp          fab
> python-telnetlib3    dcavalca
> python-textile       thm
> python-textparser    fab
> python-timeout-decorator jcapitao
> python-tinydb        petersen suanand
> python-towncrier     eclipseo
> python-trie          peter
> python-uhashring     amoralej
> python-unix-ar       ppfeister
> python-warlock       apevec jcapitao mrunge
> python-xlrd          ondrejj pingou
> python-zstandard     ignatenkobrain rathann
> python3-exiv2        asn
> quearcode            limb
> reuse                jstanek
> rpm-spec-language-server frostyx
> scancode-toolkit     eclipseo
> syncstar             t0xic0der
> vapoursynth          slaanesh
>
> Packages by maintainer:
> aalvarez   onnx
> amigadave  python-diff-match-patch
> amoralej   python-uhashring
> antorres   python-pyrad
> apevec     python-pymongo python-warlock
> asn        python3-exiv2
> atim       mat2
> cicku      python-pyrad
> cstratak   python-pymongo
> dcavalca   mkdocs python-paginate python-telnetlib3
> defolos    pmbootstrap
> dherrera   onnx
> eclipseo   patool python-towncrier scancode-toolkit
> fab        past-time python-ailment python-aioftp python-aiomultiprocess
> python-archinfo python-asysocks python-claripy python-cmd2 python-haversion
> python-jsonpath-ng python-pyiqvia python-rpyc python-smi python-ssdp python-
> textparser
> fedepell   python-influxdb-client
> filiperosset hddfancontrol
> frantisekz python-flask-session
> frostyx    rpm-spec-language-server
> girst      pykka
> hhorak     python-pymongo
> ignatenkobrain python-hvac python-zstandard
> jcapitao   python-cmd2 python-timeout-decorator python-warlock
> jcaratzas  python-requests-unixsocket
> jonathanspw python-pymongo
> jonny      python-libusb1
> jpena      python-flask-httpauth
> jstanek    reuse
> jussilehtola python-optking python-qcelemental
> kevin      python-jaconv python-pytest-fixture-config
> ktdreyer   python-cmd2
> limb       python-blowfish python-dropbox python-logutils python-optuna quearcode
> mikelo2    python-pytest-dependency
> mikep      python-ailment python-archinfo python-claripy
> mrunge     python-warlock
> ngompa     python-hvac
> ondrejj    python-nine python-xlrd
> orion      python-archspec python-envisage python-pymongo
> peter      python-asn1tools python-base58 python-ckzg python-dataclassy python-
> eth-abi python-eth-account python-eth-event python-eth-hash python-eth-keyfile
> python-eth-keys python-eth-rlp python-eth-stdlib python-eth-typing python-eth-
> utils python-hexbytes python-lazy_load python-libusb1 python-lru-dict python-
> morphys python-multiaddr python-multibase python-multicodec python-multihash
> python-pybeam python-pyrad python-rlp python-trie
> petersen   python-tinydb
> pingou     python-xlrd
> ppfeister  python-unix-ar
> radez      python-requests-unixsocket
> rathann    lazygal python-zstandard
> rcallicotte python-hvac
> salimma    python-mailman-web
> sergiopr   python-pandas-datareader
> slaanesh   vapoursynth
> smani      mkdocs
> somlo      python-migen
> stevetraylen python-influxdb-client
> suanand    python-tinydb
> t0xic0der  syncstar
> thebeanogamer python-pyaes
> thm        python-textile
> trix       python-einops
> ttorcz     python-simple-pid
> xdelaruelle mogui
> zbyszek    python-music21
>

--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok

--
_______________________________________________
devel-announce mailing list -- devel-announce@lists.fedoraproject.org
To unsubscribe send an email to devel-announce-leave@lists.fedoraproject.org
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-announce@lists.fedoraproject.org
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue

No comments:

Post a Comment