17
0

2 Commits

2 changed files with 22 additions and 25 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jun 10 07:53:07 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to pip-based build and libalternatives
------------------------------------------------------------------- -------------------------------------------------------------------
Thu May 2 16:36:25 UTC 2024 - Dirk Müller <dmueller@suse.com> Thu May 2 16:36:25 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-pykickstart # spec file for package python-pykickstart
# #
# Copyright (c) 2024 SUSE LLC # Copyright (c) 2025 SUSE LLC
# Copyright (c) 2020 Neal Gompa <ngompa13@gmail.com>. # Copyright (c) 2020 Neal Gompa <ngompa13@gmail.com>.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
@@ -18,29 +18,27 @@
%global mod_name pykickstart %global mod_name pykickstart
%bcond_without libalternatives
# Python 2 isn't supported... # Python 2 isn't supported...
%global skip_python2 1
Name: python-%{mod_name} Name: python-%{mod_name}
Version: 3.54 Version: 3.54
Release: 0 Release: 0
Summary: Python module for parsing and writing kickstart files Summary: Python module for parsing and writing kickstart files
Group: Development/Libraries/Python
License: GPL-2.0-only AND MIT License: GPL-2.0-only AND MIT
URL: http://fedoraproject.org/wiki/pykickstart Group: Development/Libraries/Python
URL: https://fedoraproject.org/wiki/pykickstart
Source0: https://github.com/pykickstart/pykickstart/releases/download/r%{version}/%{mod_name}-%{version}.tar.gz Source0: https://github.com/pykickstart/pykickstart/releases/download/r%{version}/%{mod_name}-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildArch: noarch
BuildRequires: %{python_module requests} BuildRequires: %{python_module requests}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gettext BuildRequires: gettext
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: alts
Requires: python-requests Requires: python-requests
BuildArch: noarch
%python_subpackages %python_subpackages
%description %description
@@ -53,12 +51,12 @@ and a writer to generate kickstart files.
%build %build
# Build all the translations and such # Build all the translations and such
%make_build PYTHON=%{__python3} %make_build PYTHON=python3
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
@@ -74,17 +72,11 @@ and a writer to generate kickstart files.
%check %check
%python_expand PYTHONPATH=.. $python -m unittest discover -v %python_expand PYTHONPATH=.. $python -m unittest discover -v
%post %pre
%python_install_alternative ksflatten ksflatten.1%{?ext_man} %python_libalternatives_reset_alternative ksflatten
%python_install_alternative ksshell ksshell.1%{?ext_man} %python_libalternatives_reset_alternative ksshell
%python_install_alternative ksvalidator ksvalidator.1%{?ext_man} %python_libalternatives_reset_alternative ksvalidator
%python_install_alternative ksverdiff ksverdiff.1%{?ext_man} %python_libalternatives_reset_alternative ksverdiff
%postun
%python_uninstall_alternative ksflatten ksflatten.1%{?ext_man}
%python_uninstall_alternative ksshell ksshell.1%{?ext_man}
%python_uninstall_alternative ksvalidator ksvalidator.1%{?ext_man}
%python_uninstall_alternative ksverdiff ksverdiff.1%{?ext_man}
%files %{python_files} %files %{python_files}
%license COPYING %license COPYING