public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/python-cattrs] f43: Make conditional generated BR’s more concise
Date: Sat, 11 Jul 2026 18:52:53 GMT [thread overview]
Message-ID: <178379597393.1.2763830975708913432.rpms-python-cattrs-27e847a0161f@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-cattrs
Branch : f43
Commit : 27e847a0161f231ab6fe94af5e038f912e487fda
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-07-11T07:00:17+01:00
Stats : +14/-23 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/python-cattrs/c/27e847a0161f231ab6fe94af5e038f912e487fda?branch=f43
Log:
Make conditional generated BR’s more concise
[skip changelog]
---
diff --git a/python-cattrs.spec b/python-cattrs.spec
index 88ae861..e6d9c86 100644
--- a/python-cattrs.spec
+++ b/python-cattrs.spec
@@ -32,7 +32,7 @@ Patch: 0001-Downstream-temporarily-loosen-version-bounds-on-some.patch
# with no compiled code.
%global debug_package %{nil}
-%global msgspec_enabled 0
+%dnl msgspec_enabled should be defined to 1 or undefined, never defined to 0
%if %{with msgspec}
%ifnarch s390x %{ix86}
%global msgspec_enabled 1
@@ -67,7 +67,7 @@ Obsoletes: python-cattrs-doc < 24.1.2^20241004gitae80674-6
%if %{with cbor2}
%pyproject_extras_subpkg -n python3-cattrs -a cbor2
%endif
-%if %{msgspec_enabled}
+%if %{defined msgspec_enabled}
# python-msgspec is ExcludeArch: s390x i686; the extras metapackage is arched
# because it is not present on every architecture
%pyproject_extras_subpkg -n python3-cattrs msgspec
@@ -96,26 +96,17 @@ rm --recursive --verbose docs/_static/fonts/
%generate_buildrequires
export SETUPTOOLS_SCM_PRETEND_VERSION='%{srcversion}'
-%{pyproject_buildrequires \
- --extras ujson \
-%if %{with orjson}
- --extras orjson \
-%endif
-%if %{with msgpack}
- --extras msgpack \
-%endif
- --extras pyyaml \
- --extras tomlkit \
-%if %{with cbor2}
- --extras cbor2 \
-%endif
-%if %{with bson}
- --extras bson \
-%endif
-%if %{msgspec_enabled}
- --extras msgspec \
-%endif
- --dependency-groups test}
+%{pyproject_buildrequires %{shrink:
+ --extras ujson
+ %{?with_orjson:--extras orjson}
+ %{?with_msgpack:--extras msgpack}
+ --extras pyyaml
+ --extras tomlkit
+ %{?with_cbor2:--extras cbor2}
+ %{?with_bson:--extras bson}
+ %{?msgspec_enabled:--extras msgspec}
+ --dependency-groups test
+ }}
%build
@@ -136,7 +127,7 @@ ignore="${ignore-} --ignore=tests/test_preconf.py"
ignore="${ignore-} --ignore=tests/preconf/test_pyyaml.py"
%endif
-%if !%{msgspec_enabled}
+%if %{undefined msgspec_enabled}
k="${k-}${k+ and }not test_literal_dicts_msgspec"
k="${k-}${k+ and }not test_msgspec_efficient_enum"
k="${k-}${k+ and }not test_msgspec_json_converter"
reply other threads:[~2026-07-11 18:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178379597393.1.2763830975708913432.rpms-python-cattrs-27e847a0161f@fedoraproject.org \
--to=code@musicinmybrain.net \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox