diff --git a/.gitignore b/.gitignore index 3662d02..002b912 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,3 @@ /vcstool-0.2.13.tar.gz /vcstool-0.2.14.tar.gz /vcstool-0.2.15.tar.gz -/vcstool-0.3.0.tar.gz diff --git a/python-vcstool.rpmlintrc b/python-vcstool.rpmlintrc index 76ccbc2..29dbf35 100644 --- a/python-vcstool.rpmlintrc +++ b/python-vcstool.rpmlintrc @@ -1 +1,6 @@ +# MANUAL PAGES addFilter(r'no-manual-page-for-binary (vcs|vcs-.*)( |$)') + +# SPELLING ERRORS +addFilter(r'spelling-error .* en_US (vcstools)( |$)') +addFilter(r'spelling-error Summary\(en_US\) (vcs)( |$)') diff --git a/python-vcstool.spec b/python-vcstool.spec index 22a58be..a766b1a 100644 --- a/python-vcstool.spec +++ b/python-vcstool.spec @@ -1,12 +1,14 @@ +%{?!_without_python2:%global with_python2 0%{?_with_python2:1} || !(0%{?fedora} >= 30 || 0%{?rhel} >= 8)} +%{?!_without_python3:%global with_python3 0%{?_with_python3:1} || !0%{?rhel} || 0%{?rhel} >= 7} + %global srcname vcstool Name: python-%{srcname} -Version: 0.3.0 -Release: 15%{?dist} +Version: 0.2.15 +Release: 1%{?dist} Summary: Tool to invoke vcs commands on multiple repositories -# Automatically converted from old format: ASL 2.0 - review is highly recommended. -License: Apache-2.0 +License: ASL 2.0 URL: https://github.com/dirk-thomas/%{srcname} Source0: https://github.com/dirk-thomas/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz @@ -28,6 +30,43 @@ The biggest differences between the two are: command line tools built on top. +%if 0%{?with_python2} +%package -n python2-%{srcname} +Summary: %{summary} +BuildRequires: git +BuildRequires: python2-devel +BuildRequires: python2-pytest +BuildRequires: python2-pyyaml +BuildRequires: python2-setuptools +%{?python_provide:%python_provide python2-%{srcname}} + +%if %{undefined __pythondist_requires} +Requires: python2-pyyaml +Requires: python2-setuptools +%endif + +%if !0%{?rhel} || 0%{?rhel} >= 8 +Recommends: git +%endif + +%description -n python2-%{srcname} +Vcstool is a version control system (VCS) tool, designed to make working with +multiple repositories easier. + +Note: This tool should not be confused with vcstools (with a trailing s) which +provides a Python API for interacting with different version control systems. +The biggest differences between the two are: + +- vcstool doesn't use any state beside the repository working copies available + in the filesystem. +- The file format of vcstool export uses the relative paths of the repositories + as keys in YAML which avoids collisions by design. +- vcstool has significantly less lines of code than vcstools including the + command line tools built on top. +%endif + + +%if 0%{?with_python3} %package -n python%{python3_pkgversion}-%{srcname} Summary: %{summary} BuildRequires: git @@ -60,6 +99,7 @@ The biggest differences between the two are: as keys in YAML which avoids collisions by design. - vcstool has significantly less lines of code than vcstools including the command line tools built on top. +%endif %prep @@ -67,7 +107,13 @@ The biggest differences between the two are: %build +%if 0%{?with_python2} +%py2_build +%endif + +%if 0%{?with_python3} %py3_build +%endif %install @@ -78,6 +124,27 @@ The biggest differences between the two are: install -d %{buildroot}%{_datadir}/bash-completion/completions %{buildroot}%{_bindir} +%if 0%{?with_python2} +%py2_install -- --install-scripts %{_bindir}2 + +echo -n "" > py2_bins +for f in `ls %{buildroot}%{_bindir}2`; do + mv %{buildroot}%{_bindir}2/$f %{buildroot}%{_bindir}/$f-%{python2_version} + ln -s $f-%{python2_version} %{buildroot}%{_bindir}/$f-2 +%if !(0%{?with_python3}) + ln -s $f-%{python2_version} %{buildroot}%{_bindir}/$f + echo "%{_bindir}/$f" >> py2_bins +%endif + echo -e "%{_bindir}/$f-2\n%{_bindir}/$f-%{python2_version}" >> py2_bins +done + +# Integrate bash completion with the bash-completion package +cp -f %{buildroot}%{_datadir}/%{srcname}-completion/vcs.bash %{buildroot}%{_datadir}/bash-completion/completions/vcs +ln -sf vcs %{buildroot}%{_datadir}/bash-completion/completions/vcs-2 +ln -s vcs %{buildroot}%{_datadir}/bash-completion/completions/vcs-%{python2_version} +%endif + +%if 0%{?with_python3} %py3_install -- --install-scripts %{_bindir}%{python3_pkgversion} echo -n "" > py3_bins @@ -89,9 +156,10 @@ for f in `ls %{buildroot}%{_bindir}%{python3_pkgversion}`; do done # Integrate bash completion with the bash-completion package -cp -af %{buildroot}%{_datadir}/%{srcname}-completion/vcs.bash %{buildroot}%{_datadir}/bash-completion/completions/vcs +cp -f %{buildroot}%{_datadir}/%{srcname}-completion/vcs.bash %{buildroot}%{_datadir}/bash-completion/completions/vcs ln -sf vcs %{buildroot}%{_datadir}/bash-completion/completions/vcs-3 ln -s vcs %{buildroot}%{_datadir}/bash-completion/completions/vcs-%{python3_version} +%endif %check @@ -103,10 +171,28 @@ ln -s vcs %{buildroot}%{_datadir}/bash-completion/completions/vcs-%{python3_vers --ignore test/test_commands.py \\\ test -PYTHONWARNINGS=ignore \ - %{__python3} -m pytest %pytest_options +%if 0%{?with_python2} +%{__python2} -m pytest %pytest_options +%endif + +%if 0%{?with_python3} +%{__python3} -m pytest %pytest_options +%endif +%if 0%{?with_python2} +%files -n python2-%{srcname} -f py2_bins +%license LICENSE +%doc CONTRIBUTING.md README.rst +%{python2_sitelib}/%{srcname}/ +%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info/ +%{_datadir}/%{srcname}-completion +%{_datadir}/bash-completion/completions/vcs +%{_datadir}/bash-completion/completions/vcs-2 +%{_datadir}/bash-completion/completions/vcs-%{python2_version} +%endif + +%if 0%{?with_python3} %files -n python%{python3_pkgversion}-%{srcname} -f py3_bins %license LICENSE %doc CONTRIBUTING.md README.rst @@ -116,74 +202,10 @@ PYTHONWARNINGS=ignore \ %{_datadir}/bash-completion/completions/vcs %{_datadir}/bash-completion/completions/vcs-3 %{_datadir}/bash-completion/completions/vcs-%{python3_version} +%endif %changelog -* Wed Nov 19 2025 Scott K Logan - 0.3.0-15 -- Ignore warnings during pytest (rhbz#2403567) - -* Fri Sep 19 2025 Python Maint - 0.3.0-14 -- Rebuilt for Python 3.14.0rc3 bytecode - -* Fri Aug 15 2025 Python Maint - 0.3.0-13 -- Rebuilt for Python 3.14.0rc2 bytecode - -* Fri Jul 25 2025 Fedora Release Engineering - 0.3.0-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Mon Jun 02 2025 Python Maint - 0.3.0-11 -- Rebuilt for Python 3.14 - -* Sat Jan 18 2025 Fedora Release Engineering - 0.3.0-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Wed Jul 24 2024 Miroslav Suchý - 0.3.0-9 -- convert license to SPDX - -* Fri Jul 19 2024 Fedora Release Engineering - 0.3.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Fri Jun 07 2024 Python Maint - 0.3.0-7 -- Rebuilt for Python 3.13 - -* Fri Jan 26 2024 Fedora Release Engineering - 0.3.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Mon Jan 22 2024 Fedora Release Engineering - 0.3.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jul 21 2023 Fedora Release Engineering - 0.3.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Tue Jun 13 2023 Python Maint - 0.3.0-3 -- Rebuilt for Python 3.12 - -* Fri Jan 20 2023 Fedora Release Engineering - 0.3.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Sun Oct 16 2022 Scott K Logan - 0.3.0-1 -- Update to 0.3.0 (rhbz#1991775) -- Drop Python 2 subpackage, which is no longer supported upstream - -* Fri Jul 22 2022 Fedora Release Engineering - 0.2.15-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Mon Jun 13 2022 Python Maint - 0.2.15-6 -- Rebuilt for Python 3.11 - -* Fri Jan 21 2022 Fedora Release Engineering - 0.2.15-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Tue Jul 27 2021 Fedora Release Engineering - 0.2.15-4 -- Second attempt - Rebuilt for - https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Fri Jun 04 2021 Python Maint - 0.2.15-3 -- Rebuilt for Python 3.10 - -* Wed Jan 27 2021 Fedora Release Engineering - 0.2.15-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - * Mon Nov 02 2020 Scott K Logan - 0.2.15-1 - Update to 0.2.15 (rhbz#1891662) @@ -205,9 +227,6 @@ PYTHONWARNINGS=ignore \ * Fri May 29 2020 Scott K Logan - 0.2.9-1 - Update to 0.2.9 (rhbz#1838404) -* Tue May 26 2020 Miro Hrončok - 0.2.8-2 -- Rebuilt for Python 3.9 - * Sun May 10 2020 Scott K Logan - 0.2.8-1 - Update to 0.2.8 (rhbz#1833742) diff --git a/sources b/sources index a9697b1..330b1bb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vcstool-0.3.0.tar.gz) = f50ec4c23fce65f71ec0070b709840150f6a90b0620dd937c234c408951b4eb6ad9d53d841d3862ce7ece54c15458fd9db434341fd4a1eabb40a7084fb71b101 +SHA512 (vcstool-0.2.15.tar.gz) = be4817ff466687e57b04254cee5b5cf9b6759b2d1e01e5f756e7d2f1294ca485a172aaab98ba09fc33a3bf0fb86e8798d95f097a15d5491ef544fb2a8825e691