diff --git a/README.md b/README.md deleted file mode 100644 index 4835af6..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# python-rpmautospec - -The python-rpmautospec package \ No newline at end of file diff --git a/changelog b/changelog deleted file mode 100644 index 0045fa6..0000000 --- a/changelog +++ /dev/null @@ -1,142 +0,0 @@ -* Wed Jul 27 2022 Nils Philippsen - 0.3.0-1 -- Update to 0.3.0 - -* Wed Jun 08 2022 Nils Philippsen -- Generally BR: python3-pytest-xdist, also on EL9 - -* Mon May 16 2022 Nils Philippsen - 0.2.8-1 -- Update to 0.2.8 -- Don't require python3-pytest-xdist for building on EL9 - -* Mon May 16 2022 Nils Philippsen - 0.2.7-1 -- Update to 0.2.7 - -* Mon Apr 25 2022 Nils Philippsen - 0.2.6-1 -- Update to 0.2.6 -- Require python3-pytest-xdist for building -- Remove EL7 quirks, pkg isn't built there - -* Fri Mar 04 2022 Nils Philippsen -- require python3-pyyaml for building - -* Sun Nov 07 2021 Nils Philippsen -- require python3-babel and glibc langpacks (the latter for testing) - -* Fri Aug 06 2021 Nils Philippsen - 0.2.5-1 -- Update to 0.2.5 - -* Thu Aug 05 2021 Nils Philippsen - 0.2.4-1 -- Update to 0.2.4 - -* Wed Jun 16 2021 Nils Philippsen - 0.2.3-1 -- Update to 0.2.3 - -* Fri Jun 04 2021 Nils Philippsen - 0.2.2-1 -- Update to 0.2.2 - -* Thu May 27 2021 Nils Philippsen - 0.2.1-1 -- Update to 0.2.1 - -* Thu May 27 2021 Stephen Coady - 0.2.0-1 -- Update to 0.2.0 - -* Thu May 27 2021 Nils Philippsen -- don't ship obsolete Koji configuration snippet - -* Wed May 19 2021 Nils Philippsen -- remove git-core, fix RPM related dependencies - -* Wed May 12 2021 Nils Philippsen -- depend on python3-pygit2 - -* Thu Apr 22 2021 Nils Philippsen -- remove the hub plugin - -* Thu Apr 15 2021 Nils Philippsen - 0.1.5-1 -- Update to 0.1.5 -- Have lowercase URLs, because Pagure d'oh - -* Thu Apr 15 2021 Nils Philippsen - 0.1.4-1 -- Update to 0.1.4 -- explicitly BR: python3-setuptools - -* Thu Apr 09 2020 Pierre-Yves Chibon - 0.1.3-1 -- Update to 0.1.3 - -* Thu Apr 09 2020 Pierre-Yves Chibon - 0.1.2-1 -- Update to 0.1.2 - -* Thu Apr 09 2020 Pierre-Yves Chibon - 0.1.1-1 -- Update to 0.1.1 - -* Thu Apr 09 2020 Pierre-Yves Chibon - 0.1.0-1 -- Update to 0.1.0 - -* Wed Apr 08 2020 Pierre-Yves Chibon - 0.0.23-1 -- Update to 0.023 - -* Wed Apr 08 2020 Pierre-Yves Chibon - 0.0.22-1 -- Update to 0.0.22 - -* Wed Apr 08 2020 Pierre-Yves Chibon - 0.0.21-1 -- Update to 0.0.21 - -* Wed Apr 08 2020 Pierre-Yves Chibon - 0.0.20-1 -- Update to 0.0.20 - -* Wed Apr 08 2020 Pierre-Yves Chibon - 0.0.19-1 -- Update to 0.0.19 - -* Wed Apr 08 2020 Pierre-Yves Chibon - 0.0.18-1 -- Update to 0.0.18 - -* Tue Apr 07 2020 Pierre-Yves Chibon - 0.0.17-1 -- Update to 0.0.17 - -* Tue Apr 07 2020 Pierre-Yves Chibon - 0.0.16-1 -- Update to 0.0.16 - -* Tue Apr 07 2020 Pierre-Yves Chibon - 0.0.15-1 -- Update to 0.0.15 - -* Tue Apr 07 2020 Pierre-Yves Chibon - 0.0.14-1 -- Update to 0.0.14 - -* Tue Apr 07 2020 Pierre-Yves Chibon - 0.0.13-1 -- Update to 0.0.13 - -* Tue Apr 07 2020 Pierre-Yves Chibon - 0.0.12-1 -- Update to 0.0.12 - -* Mon Apr 06 2020 Pierre-Yves Chibon - 0.0.11-1 -- Update to 0.0.11 - -* Fri Apr 03 2020 Nils Philippsen - 0.0.10-1 -- Update to 0.0.10 - -* Fri Apr 03 2020 Pierre-Yves Chibon - 0.0.9-1 -- Update to 0.0.9 - -* Fri Apr 03 2020 Pierre-Yves Chibon - 0.0.8-1 -- Update to 0.0.8 - -* Fri Apr 03 2020 Pierre-Yves Chibon - 0.0.7-1 -- Update to 0.0.7 - -* Thu Apr 02 2020 Pierre-Yves Chibon - 0.0.6-1 -- Update to 0.0.6 - -* Tue Mar 31 2020 Pierre-Yves Chibon - 0.0.5-1 -- Update to 0.0.5 - -* Tue Mar 31 2020 Pierre-Yves Chibon - 0.0.4-1 -- Update to 0.0.4 - -* Tue Mar 31 2020 Pierre-Yves Chibon - 0.0.3-1 -- Update to 0.0.3 - -* Tue Mar 31 2020 Pierre-Yves Chibon - 0.0.2-1 -- Update to 0.0.2 - -* Wed Mar 18 2020 Adam Saleh - 0.0.1-1 -- initial package for Fedora diff --git a/python-rpmautospec.spec b/python-rpmautospec.spec index dd64014..5bfb253 100644 --- a/python-rpmautospec.spec +++ b/python-rpmautospec.spec @@ -1,3 +1,13 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.7.2) +## 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 + # Polyfill %%bcond() macro for platforms without it %if 0%{!?bcond:1} %define bcond() %[ (%2)\ @@ -6,8 +16,16 @@ ] %endif -# The pytest-xdist package is not available when bootstrapping or for EL builds -%bcond xdist %{undefined rhel} +# Set this to 1 when bootstrapping +%bcond bootstrap 0 + +%bcond tests 1 + +# While bootstrapping, ignore manpages +%bcond manpages %{without bootstrap} + +# The pytest-xdist package is not available when bootstrapping or on RHEL +%bcond xdist %[%{without bootstrap} && %{undefined rhel}] # Package the placeholder rpm-macros (moved to redhat-rpm-config in F40) %if ! (0%{?fedora} >= 40 || 0%{?rhel} >= 10) @@ -16,6 +34,9 @@ %bcond rpmmacropkg 0 %endif +%if %{with bootstrap} +%bcond poetry 0 +%else %if ! 0%{?fedora}%{?rhel} || 0%{?fedora} || 0%{?epel} >= 9 %bcond poetry 1 # Appease old Poetry versions (<1.2.0a2) @@ -27,18 +48,18 @@ %else %bcond poetry 0 %endif - -%if ! 0%{?fedora}%{?rhel} || 0%{?fedora} || 0%{?epel} >= 9 || 0%{?rhel} >= 10 -%bcond manpage_manual_title 1 -%else -%bcond manpage_manual_title 0 %endif %global srcname rpmautospec Name: python-%{srcname} -Version: 0.6.5 +Version: 0.7.3 + +%if %{with bootstrap} +Release: 0%{?dist} +%else Release: %autorelease +%endif Summary: Package and CLI tool to generate release fields and changelogs License: MIT URL: https://github.com/fedora-infra/%{srcname} @@ -49,22 +70,31 @@ Source0: https://github.com/fedora-infra/%{srcname}/releases/download/%{version} %endif BuildArch: noarch -BuildRequires: argparse-manpage BuildRequires: git # the langpacks are needed for tests BuildRequires: glibc-langpack-de BuildRequires: glibc-langpack-en BuildRequires: python3-devel >= 3.9.0 +# Needed to build man pages +%if %{with manpages} +BuildRequires: python3dist(click-man) +%endif + +%if %{with tests} # The dependencies needed for testing don’t get auto-generated. BuildRequires: python3dist(pytest) %if %{with xdist} BuildRequires: python3dist(pytest-xdist) %endif +%endif + BuildRequires: python3dist(pyyaml) BuildRequires: sed %if %{without poetry} BuildRequires: python3dist(babel) +BuildRequires: python3dist(click) +BuildRequires: python3dist(click-plugins) BuildRequires: python3dist(pygit2) BuildRequires: python3dist(rpm) BuildRequires: python3dist(rpmautospec-core) @@ -107,6 +137,9 @@ enabled packages locally. %prep %autosetup -n %{srcname}-%{version} +%if %{without poetry} +sed -i -e 's/\[project\]/#\&/g' pyproject.toml +%endif %if %{with old_poetry} sed -i \ -e 's/\[tool\.poetry\.group\.dev\.dependencies\]/[tool.poetry.dev-dependencies]/g' \ @@ -137,32 +170,66 @@ cat << EOF > %{pyproject_files} EOF %endif -install -d %{buildroot}%{_mandir}/man1 -PYTHONPATH=%{buildroot}%{python3_sitelib} argparse-manpage \ -%if %{with manpage_manual_title} - --manual-title "User Commands" \ +%if %{with manpages} +# Man pages +PYTHONPATH=%{buildroot}%{python3_sitelib} click-man rpmautospec +install -m755 -d %{buildroot}%{_mandir}/man1 +install -m644 man/*.1 %{buildroot}%{_mandir}/man1 %endif - --project-name rpmautospec \ - --module rpmautospec.cli \ - --function get_arg_parser > %{buildroot}%{_mandir}/man1/rpmautospec.1 +# RPM macros %if %{with rpmmacropkg} mkdir -p %{buildroot}%{rpmmacrodir} -install -m 644 rpm/macros.d/macros.rpmautospec %{buildroot}%{rpmmacrodir}/ +install -m 644 rpm/macros.d/macros.rpmautospec %{buildroot}%{rpmmacrodir}/ %endif +# Shell completion +for shell_path in \ + bash:%{bash_completions_dir}/rpmautospec \ + fish:%{fish_completions_dir}/rpmautospec.fish \ + zsh:%{zsh_completions_dir}/_rpmautospec; do + shell="${shell_path%%:*}" + path="${shell_path#*:}" + dir="${path%/*}" + + install -m 755 -d "%{buildroot}${dir}" + + PYTHONPATH=%{buildroot}%{python3_sitelib} \ + _RPMAUTOSPEC_COMPLETE="${shell}_source" \ + %{__python3} -c \ + "import sys; sys.argv[0] = 'rpmautospec'; from rpmautospec.cli import cli; sys.exit(cli())" \ + > "%{buildroot}${path}" +done + %check +# Always run the import checks, even when other tests are disabled +%if %{with poetry} +%pyproject_check_import +%else +%py3_check_import rpmautospec rpmautospec.cli +%endif + +%if %{with tests} %pytest -v \ %if %{with xdist} --numprocesses=auto %endif +%endif %files -n python3-%{srcname} -f %{pyproject_files} %doc README.rst %files -n %{srcname} %{_bindir}/rpmautospec -%{_mandir}/man1/rpmautospec.1* +%if %{with manpages} +%{_mandir}/man1/rpmautospec*.1* +%endif +%dir %{bash_completions_dir} +%{bash_completions_dir}/rpmautospec +%dir %{fish_completions_dir} +%{fish_completions_dir}/rpmautospec.fish +%dir %{zsh_completions_dir} +%{zsh_completions_dir}/_rpmautospec %if %{with rpmmacropkg} %files -n rpmautospec-rpm-macros @@ -170,4 +237,265 @@ install -m 644 rpm/macros.d/macros.rpmautospec %{buildroot}%{rpmmacrodir}/ %endif %changelog -%autochangelog +## START: Generated by rpmautospec +* Fri Oct 11 2024 Nils Philippsen - 0.7.3-1 +- Update to 0.7.3 + +* Fri Sep 20 2024 Yaakov Selkowitz - 0.7.2-2 +- Fix build without poetry + +* Fri Aug 30 2024 Nils Philippsen - 0.7.2-1 +- Update to 0.7.2 + +* Wed Aug 21 2024 Miro Hrončok - 0.7.1-3 +- Bootstrap build: Remove a bogus changelog + +* Tue Aug 20 2024 Stephen Gallagher - 0.7.1-2 +- Enable bootstrapping macros + +* Tue Aug 13 2024 Nils Philippsen - 0.7.1-1 +- Update to 0.7.1 + +* Mon Aug 12 2024 Nils Philippsen - 0.7.0-1 +- Update to 0.7.0 +- Split off man pages for sub-commands +- Ship scriptlets needed for shell completion + +* Fri Jul 19 2024 Fedora Release Engineering - 0.6.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Tue Jun 18 2024 Nils Philippsen - 0.6.5-1 +- Update to 0.6.5 + +* Tue Jun 11 2024 Python Maint - 0.6.4-2 +- Rebuilt for Python 3.13 + +* Mon Jun 10 2024 Nils Philippsen - 0.6.4-1 +- Update to 0.6.4 +- Install man page + +* Fri Jun 07 2024 Python Maint - 0.6.3-2 +- Rebuilt for Python 3.13 + +* Wed Feb 21 2024 Nils Philippsen - 0.6.3-1 +- Update to 0.6.3 + +* Mon Feb 19 2024 Nils Philippsen - 0.6.2-1 +- Update to 0.6.2 + +* Fri Feb 09 2024 Nils Philippsen - 0.6.1-1 +- Update to 0.6.1 + +* Sat Jan 27 2024 Nils Philippsen - 0.6.0-1 +- Update to 0.6.0 + +* Fri Jan 26 2024 Fedora Release Engineering - 0.5.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 0.5.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Tue Jan 16 2024 Nils Philippsen - 0.5.1-1 +- Update to 0.5.1 + +* Mon Jan 15 2024 Nils Philippsen - 0.5.0-1 +- Update to 0.5.0 + +* Thu Jan 11 2024 Nils Philippsen - 0.4.2-1 +- Update to 0.4.2 + +* Mon Jan 08 2024 Nils Philippsen - 0.4.1-2 +- Update patch for old poetry versions + +* Fri Dec 15 2023 Nils Philippsen - 0.4.1-1 +- Update to 0.4.1 + +* Sun Dec 03 2023 Yaakov Selkowitz - 0.4.0-2 +- Drop unwanted python-pytest-cov dependency + +* Thu Nov 30 2023 Nils Philippsen - 0.4.0-1 +- Update to 0.4.0 + +* Tue Nov 14 2023 Nils Philippsen - 0.3.8-1 +- Update to 0.3.8 + +* Tue Nov 14 2023 Nils Philippsen - 0.3.7-1 +- Update to 0.3.7 + +* Tue Nov 14 2023 Nils Philippsen - 0.3.6-1 +- Update to 0.3.6 + +* Tue Aug 22 2023 Yaakov Selkowitz - 0.3.5-5 +- Disable the macros subpackage in F40+ + +* Fri Jul 21 2023 Fedora Release Engineering - 0.3.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jun 14 2023 Python Maint - 0.3.5-3 +- Rebuilt for Python 3.12 + +* Wed May 24 2023 Yaakov Selkowitz - 0.3.5-2 +- Avoid pytest-cov, disable xdist in RHEL builds + +* Wed Feb 08 2023 Nils Philippsen - 0.3.5-1 +- Update to 0.3.5 + +* Wed Feb 08 2023 Nils Philippsen - 0.3.4-1 +- Update to 0.3.4 + +* Wed Feb 08 2023 Nils Philippsen - 0.3.3-1 +- Update to 0.3.3 + +* Tue Jan 24 2023 Nils Philippsen - 0.3.2-1 +- Update to 0.3.2 + +* Fri Jan 20 2023 Fedora Release Engineering - 0.3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Nov 11 2022 Nils Philippsen - 0.3.1-1 +- Update to 0.3.1 + +* Wed Jul 27 2022 Nils Philippsen - 0.3.0-1 +- Update to 0.3.0 + +* Wed Jun 08 2022 Nils Philippsen +- Generally BR: python3-pytest-xdist, also on EL9 + +* Mon May 16 2022 Nils Philippsen - 0.2.8-1 +- Update to 0.2.8 +- Don't require python3-pytest-xdist for building on EL9 + +* Mon May 16 2022 Nils Philippsen - 0.2.7-1 +- Update to 0.2.7 + +* Mon Apr 25 2022 Nils Philippsen - 0.2.6-1 +- Update to 0.2.6 +- Require python3-pytest-xdist for building +- Remove EL7 quirks, pkg isn't built there + +* Fri Mar 04 2022 Nils Philippsen +- require python3-pyyaml for building + +* Sun Nov 07 2021 Nils Philippsen +- require python3-babel and glibc langpacks (the latter for testing) + +* Fri Aug 06 2021 Nils Philippsen - 0.2.5-1 +- Update to 0.2.5 + +* Thu Aug 05 2021 Nils Philippsen - 0.2.4-1 +- Update to 0.2.4 + +* Wed Jun 16 2021 Nils Philippsen - 0.2.3-1 +- Update to 0.2.3 + +* Fri Jun 04 2021 Nils Philippsen - 0.2.2-1 +- Update to 0.2.2 + +* Thu May 27 2021 Nils Philippsen - 0.2.1-1 +- Update to 0.2.1 + +* Thu May 27 2021 Stephen Coady - 0.2.0-1 +- Update to 0.2.0 + +* Thu May 27 2021 Nils Philippsen +- don't ship obsolete Koji configuration snippet + +* Wed May 19 2021 Nils Philippsen +- remove git-core, fix RPM related dependencies + +* Wed May 12 2021 Nils Philippsen +- depend on python3-pygit2 + +* Thu Apr 22 2021 Nils Philippsen +- remove the hub plugin + +* Thu Apr 15 2021 Nils Philippsen - 0.1.5-1 +- Update to 0.1.5 +- Have lowercase URLs, because Pagure d'oh + +* Thu Apr 15 2021 Nils Philippsen - 0.1.4-1 +- Update to 0.1.4 +- explicitly BR: python3-setuptools + +* Thu Apr 09 2020 Pierre-Yves Chibon - 0.1.3-1 +- Update to 0.1.3 + +* Thu Apr 09 2020 Pierre-Yves Chibon - 0.1.2-1 +- Update to 0.1.2 + +* Thu Apr 09 2020 Pierre-Yves Chibon - 0.1.1-1 +- Update to 0.1.1 + +* Thu Apr 09 2020 Pierre-Yves Chibon - 0.1.0-1 +- Update to 0.1.0 + +* Wed Apr 08 2020 Pierre-Yves Chibon - 0.0.23-1 +- Update to 0.023 + +* Wed Apr 08 2020 Pierre-Yves Chibon - 0.0.22-1 +- Update to 0.0.22 + +* Wed Apr 08 2020 Pierre-Yves Chibon - 0.0.21-1 +- Update to 0.0.21 + +* Wed Apr 08 2020 Pierre-Yves Chibon - 0.0.20-1 +- Update to 0.0.20 + +* Wed Apr 08 2020 Pierre-Yves Chibon - 0.0.19-1 +- Update to 0.0.19 + +* Wed Apr 08 2020 Pierre-Yves Chibon - 0.0.18-1 +- Update to 0.0.18 + +* Tue Apr 07 2020 Pierre-Yves Chibon - 0.0.17-1 +- Update to 0.0.17 + +* Tue Apr 07 2020 Pierre-Yves Chibon - 0.0.16-1 +- Update to 0.0.16 + +* Tue Apr 07 2020 Pierre-Yves Chibon - 0.0.15-1 +- Update to 0.0.15 + +* Tue Apr 07 2020 Pierre-Yves Chibon - 0.0.14-1 +- Update to 0.0.14 + +* Tue Apr 07 2020 Pierre-Yves Chibon - 0.0.13-1 +- Update to 0.0.13 + +* Tue Apr 07 2020 Pierre-Yves Chibon - 0.0.12-1 +- Update to 0.0.12 + +* Mon Apr 06 2020 Pierre-Yves Chibon - 0.0.11-1 +- Update to 0.0.11 + +* Fri Apr 03 2020 Nils Philippsen - 0.0.10-1 +- Update to 0.0.10 + +* Fri Apr 03 2020 Pierre-Yves Chibon - 0.0.9-1 +- Update to 0.0.9 + +* Fri Apr 03 2020 Pierre-Yves Chibon - 0.0.8-1 +- Update to 0.0.8 + +* Fri Apr 03 2020 Pierre-Yves Chibon - 0.0.7-1 +- Update to 0.0.7 + +* Thu Apr 02 2020 Pierre-Yves Chibon - 0.0.6-1 +- Update to 0.0.6 + +* Tue Mar 31 2020 Pierre-Yves Chibon - 0.0.5-1 +- Update to 0.0.5 + +* Tue Mar 31 2020 Pierre-Yves Chibon - 0.0.4-1 +- Update to 0.0.4 + +* Tue Mar 31 2020 Pierre-Yves Chibon - 0.0.3-1 +- Update to 0.0.3 + +* Tue Mar 31 2020 Pierre-Yves Chibon - 0.0.2-1 +- Update to 0.0.2 + +* Wed Mar 18 2020 Adam Saleh - 0.0.1-1 +- initial package for Fedora + +## END: Generated by rpmautospec diff --git a/sources b/sources index afb2ef8..cf7db6c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rpmautospec-0.6.5.tar.gz) = 4740a471d25896314cbb37ab7a34d24fa7d3b6512ea4d5d7444528e0669bca79cb23a180b8a591378a40e832df4a6673ac20930f38672d268d9c70fb49748771 +e1d88a616228dad805b1bdec5a74d3287057b997 rpmautospec-0.7.3.tar.gz