## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec Name: kconfiglib Version: 14.1.1a4 Release: %{autorelease} Summary: Kconfig implementation in Python License: ISC URL: https://github.com/zephyrproject-rtos/Kconfiglib Source: %{url}/archive/v%{version}/kconfiglib-%{version}.tar.gz Patch: selftest.patch BuildArch: noarch BuildRequires: python3-devel # Need to check import BuildRequires: python3-tkinter # Needed to build documentation BuildRequires: help2man Requires: python3-kconfiglib %global _help2man() PYTHONPATH='%{buildroot}%{python3_sitelib}' help2man --version-string='%{version}' --no-discard-stderr --no-info --name=%1 --output=%{buildroot}%{_mandir}/man1/%1.1 %{buildroot}%{_bindir}/%1 %global _description %{expand: Kconfiglib is a Kconfig implementation in Python 2/3. It started out as a helper library, but now has a enough functionality to also work well as a standalone Kconfig implementation (including terminal and GUI menuconfig interfaces and Kconfig extensions). } %description %_description %package -n python3-kconfiglib Summary: Kconfig implementation in Python (library) %description -n python3-kconfiglib The kconfiglib's python library only sub-package. %prep %autosetup -n Kconfiglib-%{version} # Do not mark examples as executable chmod -x examples/*.py %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %check %pyproject_check_import cd .. ln -s Kconfiglib-%{version} Kconfiglib %{python3} Kconfiglib/testsuite.py unlink Kconfiglib %install %pyproject_install %pyproject_save_files kconfiglib alldefconfig allnoconfig allmodconfig allyesconfig defconfig guiconfig genconfig listnewconfig menuconfig oldconfig olddefconfig savedefconfig setconfig sed -r -i '1{/^#!/d}' '%{buildroot}%{python3_sitelib}/alldefconfig.py' sed -r -i '1{/^#!/d}' '%{buildroot}%{python3_sitelib}/allmodconfig.py' sed -r -i '1{/^#!/d}' '%{buildroot}%{python3_sitelib}/allnoconfig.py' sed -r -i '1{/^#!/d}' '%{buildroot}%{python3_sitelib}/allyesconfig.py' sed -r -i '1{/^#!/d}' '%{buildroot}%{python3_sitelib}/defconfig.py' sed -r -i '1{/^#!/d}' '%{buildroot}%{python3_sitelib}/genconfig.py' sed -r -i '1{/^#!/d}' '%{buildroot}%{python3_sitelib}/guiconfig.py' sed -r -i '1{/^#!/d}' '%{buildroot}%{python3_sitelib}/listnewconfig.py' sed -r -i '1{/^#!/d}' '%{buildroot}%{python3_sitelib}/menuconfig.py' sed -r -i '1{/^#!/d}' '%{buildroot}%{python3_sitelib}/oldconfig.py' sed -r -i '1{/^#!/d}' '%{buildroot}%{python3_sitelib}/olddefconfig.py' sed -r -i '1{/^#!/d}' '%{buildroot}%{python3_sitelib}/savedefconfig.py' sed -r -i '1{/^#!/d}' '%{buildroot}%{python3_sitelib}/setconfig.py' install -d '%{buildroot}%{_mandir}/man1' %_help2man alldefconfig %_help2man allmodconfig %_help2man allnoconfig %_help2man allyesconfig %_help2man defconfig %_help2man genconfig %_help2man guiconfig %_help2man listnewconfig %_help2man menuconfig %_help2man oldconfig %_help2man olddefconfig %_help2man savedefconfig %_help2man setconfig %files %{_bindir}/alldefconfig %{_bindir}/allmodconfig %{_bindir}/allnoconfig %{_bindir}/allyesconfig %{_bindir}/defconfig %{_bindir}/genconfig %{_bindir}/guiconfig %{_bindir}/listnewconfig %{_bindir}/menuconfig %{_bindir}/oldconfig %{_bindir}/olddefconfig %{_bindir}/savedefconfig %{_bindir}/setconfig %{_mandir}/man1/alldefconfig.1* %{_mandir}/man1/allmodconfig.1* %{_mandir}/man1/allnoconfig.1* %{_mandir}/man1/allyesconfig.1* %{_mandir}/man1/defconfig.1* %{_mandir}/man1/genconfig.1* %{_mandir}/man1/guiconfig.1* %{_mandir}/man1/listnewconfig.1* %{_mandir}/man1/menuconfig.1* %{_mandir}/man1/oldconfig.1* %{_mandir}/man1/olddefconfig.1* %{_mandir}/man1/savedefconfig.1* %{_mandir}/man1/setconfig.1* %doc examples %files -n python3-kconfiglib -f %{pyproject_files} %doc README.rst %license LICENSE.txt %changelog ## START: Generated by rpmautospec * Mon Mar 24 2025 John Doe - 14.1.1a4-1 - Uncommitted changes ## END: Generated by rpmautospec