public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-cattrs] f43: Make conditional generated BR’s more concise
@ 2026-07-11 18:52 Benjamin A. Beasley
0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-07-11 18:52 UTC (permalink / raw)
To: git-commits
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"
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-11 18:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-11 18:52 [rpms/python-cattrs] f43: Make conditional generated BR’s more concise Benjamin A. Beasley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox