Fix building on Fedora 37 and EPEL 9
These OS releases come with a Poetry version older than 1.2 and don’t cope with group sections in pyproject.toml. [skip changelog] Signed-off-by: Nils Philippsen <nils@redhat.com>
This commit is contained in:
parent
e2e8052efe
commit
264dae5a4c
@ -8,6 +8,13 @@
|
|||||||
%bcond rpmmacropkg 0
|
%bcond rpmmacropkg 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# Appease old Poetry versions (<1.2.0a2)
|
||||||
|
%if ! 0%{?fedora}%{?rhel} || 0%{?fedora} >= 38 || 0%{?rhel} >= 10
|
||||||
|
%bcond oldpoetry 0
|
||||||
|
%else
|
||||||
|
%bcond oldpoetry 1
|
||||||
|
%endif
|
||||||
|
|
||||||
%global srcname rpmautospec
|
%global srcname rpmautospec
|
||||||
%global canonicalname %{py_dist_name %{srcname}}
|
%global canonicalname %{py_dist_name %{srcname}}
|
||||||
|
|
||||||
@ -18,6 +25,7 @@ Summary: Package and CLI tool to generate release fields and changelogs
|
|||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/fedora-infra/%{canonicalname}
|
URL: https://github.com/fedora-infra/%{canonicalname}
|
||||||
Source0: https://github.com/fedora-infra/%{canonicalname}/releases/download/%{version}/%{canonicalname}-%{version}.tar.gz
|
Source0: https://github.com/fedora-infra/%{canonicalname}/releases/download/%{version}/%{canonicalname}-%{version}.tar.gz
|
||||||
|
Patch100: rpmautospec-0.3.7-old-poetry.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: git
|
BuildRequires: git
|
||||||
@ -80,7 +88,11 @@ enabled packages locally.
|
|||||||
%pyproject_buildrequires
|
%pyproject_buildrequires
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{srcname}-%{version}
|
%autosetup -n %{srcname}-%{version} -N
|
||||||
|
%autopatch -M 99
|
||||||
|
%if %{with oldpoetry}
|
||||||
|
%autopatch 100
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
|
12
rpmautospec-0.3.7-old-poetry.patch
Normal file
12
rpmautospec-0.3.7-old-poetry.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -up rpmautospec-0.3.7/pyproject.toml.old-poetry rpmautospec-0.3.7/pyproject.toml
|
||||||
|
--- rpmautospec-0.3.7/pyproject.toml.old-poetry 2023-11-14 13:33:59.369684500 +0100
|
||||||
|
+++ rpmautospec-0.3.7/pyproject.toml 2023-11-14 13:57:31.085972996 +0100
|
||||||
|
@@ -47,7 +47,7 @@ babel = "^2.9"
|
||||||
|
koji = "^1.33.0"
|
||||||
|
pygit2 = "^1.2.1"
|
||||||
|
|
||||||
|
-[tool.poetry.group.dev.dependencies]
|
||||||
|
+[tool.poetry.dev-dependencies]
|
||||||
|
pyyaml = "^5.3.1 || ^6"
|
||||||
|
pytest = "^6.2.2 || ^7"
|
||||||
|
pytest-cov = "^4.0.0"
|
Loading…
Reference in New Issue
Block a user