diff --git a/.gitignore b/.gitignore index 5636a07..261fdf1 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /vcstools-0.1.39-5117043.tar.gz /vcstools-0.1.40-54418db.tar.gz /vcstools-0.1.40.tar.gz +/vcstools-0.1.42.tar.gz diff --git a/python-vcstools.rpmlintrc b/python-vcstools.rpmlintrc new file mode 100644 index 0000000..a5b085e --- /dev/null +++ b/python-vcstools.rpmlintrc @@ -0,0 +1,2 @@ +# SPELLING ERRORS +addFilter(r': spelling-error .*[ (]en_US\)? (rosinstall) -> ') diff --git a/python-vcstools.spec b/python-vcstools.spec index 8280c6c..1a22022 100644 --- a/python-vcstools.spec +++ b/python-vcstools.spec @@ -1,11 +1,12 @@ +%{?!_without_bzr:%global with_bzr 0%{?_with_bzr:1} || !(0%{?rhel} >= 8)} %{?!_without_python2:%global with_python2 0%{?_with_python2:1} || !(0%{?rhel} >= 8 || 0%{?fedora} >= 32)} %{?!_without_python3:%global with_python3 0%{?_with_python3:1} || !0%{?rhel} || 0%{?rhel} >= 7} %global srcname vcstools Name: python-%{srcname} -Version: 0.1.40 -Release: 7%{?dist} +Version: 0.1.42 +Release: 1%{?dist} Summary: Version Control System tools for Python License: BSD @@ -14,14 +15,15 @@ Source0: https://github.com/%{srcname}/%{srcname}/archive/%{version}/%{sr BuildArch: noarch -BuildRequires: bzr BuildRequires: git BuildRequires: mercurial -%if 0%{?rhel} && 0%{?rhel} <= 6 -BuildRequires: python-sphinx10 -%endif +BuildRequires: python%{python3_pkgversion}-sphinx BuildRequires: subversion +%if 0%{?with_bzr} +BuildRequires: bzr +%endif # with_bzr + %description The vcstools module provides a Python API for interacting with different version control systems (VCS/SCMs). The VcsClient class provides an API @@ -29,28 +31,34 @@ for seamless interacting with Git, Mercurial (Hg), Bzr and SVN. The focus of the API is manipulating on-disk checkouts of source-controlled trees. Its main use is to support the rosinstall tool. + %if 0%{?with_python2} %package -n python2-%{srcname} -Summary: Version Control System tools for Python -%{?python_provide:%python_provide python2-%{srcname}} +Summary: %{summary} BuildRequires: python2-dateutil BuildRequires: python2-devel BuildRequires: python2-mock BuildRequires: python2-nose BuildRequires: python2-pyyaml +BuildRequires: python2-setuptools Requires: python2-dateutil Requires: python2-pyyaml +%{?python_provide:%python_provide python2-%{srcname}} %if 0%{?rhel} && 0%{?rhel} < 8 -Requires: bzr Requires: git Requires: mercurial Requires: subversion +%if 0%{?with_bzr} +Requires: bzr +%endif # with_bzr %else -Recommends: bzr Recommends: git Recommends: mercurial Recommends: subversion +%if 0%{?with_bzr} +Recommends: bzr +%endif # with_bzr %endif # rhel %description -n python2-%{srcname} @@ -61,30 +69,34 @@ of the API is manipulating on-disk checkouts of source-controlled trees. Its main use is to support the rosinstall tool. %endif # with_python2 + %if 0%{?with_python3} %package -n python%{python3_pkgversion}-%{srcname} -Summary: Version Control System tools for Python -%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} +Summary: %{summary} BuildRequires: python%{python3_pkgversion}-dateutil BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-mock BuildRequires: python%{python3_pkgversion}-nose BuildRequires: python%{python3_pkgversion}-PyYAML BuildRequires: python%{python3_pkgversion}-setuptools -BuildRequires: python%{python3_pkgversion}-sphinx Requires: python%{python3_pkgversion}-dateutil Requires: python%{python3_pkgversion}-PyYAML +%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} %if 0%{?rhel} && 0%{?rhel} < 8 -Requires: bzr Requires: git Requires: mercurial Requires: subversion +%if 0%{?with_bzr} +Requires: bzr +%endif # with_bzr %else -Recommends: bzr Recommends: git Recommends: mercurial Recommends: subversion +%if 0%{?with_bzr} +Recommends: bzr +%endif # with_bzr %endif # rhel %description -n python%{python3_pkgversion}-%{srcname} @@ -95,12 +107,19 @@ of the API is manipulating on-disk checkouts of source-controlled trees. Its main use is to support the rosinstall tool. %endif # with_python3 + %prep %autosetup -n %{srcname}-%{version} sed -i 's/haiku/default/' doc/conf.py sed -i 's/:special-members://' doc/vcstools.rst +# Drop the test requirements from the setup.py +# The conditionals in it break with older setuptools (RHEL 7) +sed -i "s/\\w*tests_require=test_required,//" setup.py +sed -i "s/\\w*'test': test_required//" setup.py + + %build %if 0%{?with_python2} %py2_build @@ -110,13 +129,10 @@ sed -i 's/:special-members://' doc/vcstools.rst %py3_build %endif # with_python3 -%if 0%{?rhel} && 0%{?rhel} <= 6 -%make_build -C doc html man SPHINXBUILD=sphinx-1.0-build -%else -%make_build -C doc html man -%endif +%make_build -C doc html man SPHINXBUILD=sphinx-build-%{python3_version} rm doc/_build/html/.buildinfo + %install %if 0%{?with_python2} %py2_install @@ -128,6 +144,7 @@ install -p -D -m 0644 doc/_build/man/%{srcname}.1 %{buildroot}%{_mandir}/man1/%{ install -p -D -m 0644 doc/_build/man/%{srcname}.1 %{buildroot}%{_mandir}/man1/python3-%{srcname}.1 %endif # with_python3 + %check # Some tests REQUIRE Python 2 to use unicode %if 0%{?rhel} @@ -136,23 +153,23 @@ export LANG=en_US.UTF-8 export LANG=C.UTF-8 %endif # rhel +%if !(0%{?with_bzr}) +%global pytest_skip_bzr |test_bzr +%endif # !with_bzr + # Exclude 5 tests which access remote data # Exclude a test with a bad unicode conversion on python2.6 machines (Github vcstools/vcstools#77) +%global pytest_skip_tests test_git_subm|test_url_matches_with_shortcut|test_checkout|test_checkout_dir_exists|test_checkout_version|test_get_url_by_reading%{?pytest_skip_bzr} + %if 0%{?with_python2} -%if "%{python2_version}" == "2.6" -nosetests test \ - -e "^(test_git_subm|test_url_matches_with_shortcut|test_checkout|test_checkout_dir_exists|test_checkout_version|test_get_url_by_reading|test_shell_command_verbose)$" -%else -%{__python2} -m nose test \ - -e "^(test_git_subm|test_url_matches_with_shortcut|test_checkout|test_checkout_dir_exists|test_checkout_version|test_get_url_by_reading)$" -%endif +%{__python2} -m nose test -e "^(%{pytest_skip_tests})$" %endif # with_python2 %if 0%{?with_python3} -%{__python3} -m nose test \ - -e "^(test_git_subm|test_url_matches_with_shortcut|test_checkout|test_checkout_dir_exists|test_checkout_version|test_get_url_by_reading)$" +%{__python3} -m nose test -e "^(%{pytest_skip_tests})$" %endif # with_python3 + %if 0%{?with_python2} %files -n python2-%{srcname} %license LICENSE @@ -171,7 +188,13 @@ nosetests test \ %{_mandir}/man1/python3-%{srcname}.1.gz %endif # with_python3 + %changelog +* Thu Oct 03 2019 Scott K Logan - 0.1.42-1 +- Update to 0.1.42 (rhbz#1742573) +- Drop RHEL 6 conditionals from spec +- Drop bzr for EPEL 8 + * Thu Sep 19 2019 Miro HronĨok - 0.1.40-7 - Subpackage python2-vcstools has been removed on Fedora 32+ See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal diff --git a/sources b/sources index 50b8b34..9b977ce 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vcstools-0.1.40.tar.gz) = 7cd062f3c72b27f78361d3000ed8951b1723ea7dd99bf05ea711e8a8b93c42c2acebdfd6c7cf7384730c708da11bd0d2712a54e538dd833eafbcef46f23857cd +SHA512 (vcstools-0.1.42.tar.gz) = 1b54270c878684862eb607c2e445fe24d8edfdd8ea2cc75e899044d9e8e89a882fd2dd6fb7825553f83003ae7af08850c18fdeaabaa107a6bfdb2759b32e8fa6