From 03184bccffa3a6d9ba051f5b695ee5a14bc735d2 Mon Sep 17 00:00:00 2001 From: Gilver Date: Thu, 5 Jun 2025 05:22:02 -0500 Subject: [PATCH] chore(umstellar): Update to modern Python build system (#5233) * chore(umstellar): Update to modern Python build system Signed-off-by: Gilver * Update umstellar.spec Signed-off-by: Gilver * chore: The funny arch thing Signed-off-by: Gilver * chore: Do the stupid guidelines stuff also fix desc formatting heehoo weewoo Signed-off-by: Gilver * fix: Add BuildArch to the Python package Signed-off-by: Gilver --------- Signed-off-by: Gilver --- anda/tools/umstellar/anda.hcl | 3 ++- anda/tools/umstellar/umstellar.spec | 32 ++++++++++++++++++++++------- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/anda/tools/umstellar/anda.hcl b/anda/tools/umstellar/anda.hcl index aa51dee858..7a7389b78b 100644 --- a/anda/tools/umstellar/anda.hcl +++ b/anda/tools/umstellar/anda.hcl @@ -1,5 +1,6 @@ project "pkg" { + arches = ["x86_64"] rpm { spec = "umstellar.spec" } -} \ No newline at end of file +} diff --git a/anda/tools/umstellar/umstellar.spec b/anda/tools/umstellar/umstellar.spec index 60a5ef3145..5f5a0b6dc3 100644 --- a/anda/tools/umstellar/umstellar.spec +++ b/anda/tools/umstellar/umstellar.spec @@ -2,13 +2,15 @@ %global pypi_name umstellar %global pypi_version 0.2.0 -Name: python-%{pypi_name} +Name: %{pypi_name} Version: %{pypi_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Ultramarine Quickstart Tool Provides: python3-%{pypi_name} = %{version}-%{release} Provides: %{pypi_name} = %{version}-%{release} +Obsoletes: python3-%{pypi_name} < 0.2.0-2 +Requires: python3-%{pypi_name} = %{version}-%{release} License: GPL-3.0 URL: https://github.com/Ultramarine-Linux/stellar @@ -16,6 +18,7 @@ Source0: %{url}/archive/v%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel +BuildRequires: python3dist(pip) BuildRequires: python3dist(setuptools) %description @@ -33,31 +36,46 @@ Summary: %{summary} Requires: python3dist(requests) Requires: python3dist(pygobject) Requires: anaconda-core -%description -n python3-%{pypi_name} +Requires: %{pypi_name} = %{version}-%{release} +BuildArch: noarch +%description -n python3-%{pypi_name} Stellar is a quick-and-dirty GUI post-install menu for Ultramarine Linux - %prep %autosetup -n stellar-%{pypi_version} %build +%if 0%{?fedora} <= 41 %py3_build +%else +%pyproject_wheel +%endif %install +%if 0%{?fedora} <= 41 %py3_install +%else +%pyproject_install +%endif # install kickstart file install -D -m 644 example.ks %{buildroot}%{_datadir}/anaconda/post-scripts/stellar.ks -%files -n python3-%{pypi_name} +%files %license LICENSE %doc README.md -%{python3_sitelib}/%{pypi_name} -%{python3_sitelib}/%{pypi_name}-%{pypi_version}-py%{python3_version}.egg-info %{_datadir}/anaconda/post-scripts/stellar.ks +%files -n python3-%{pypi_name} +%{python3_sitelib}/%{pypi_name} +%if 0%{?fedora} <= 41 +%{python3_sitelib}/%{pypi_name}-%{pypi_version}-py%{python3_version}.egg-info/ +%else +%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/ +%endif + %changelog * Mon Apr 1 2024 Lleyton Gray - 0.2.0-1 - Bump version with various fixes