Blob Blame Raw
%global srcname colcon-core

Name:           python-%{srcname}
Version:        0.4.1
Release:        2%{?dist}
Summary:        Command line tool to build sets of software packages

License:        ASL 2.0
URL:            https://colcon.readthedocs.io
Source0:        https://github.com/colcon/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz

# Not submitted upstream - make pytest dependency weak
Patch0:         %{name}-0.3.14-remove-pytest.patch
# Not submitted upstream - compatibility with pytest 2.9.X
Patch1:         %{name}-0.3.17-pytest-2.9.patch

BuildArch:      noarch

%description
colcon is a command line tool to improve the workflow of building, testing and
using multiple software packages. It automates the process, handles the ordering
and sets up the environment to use the packages.


%package -n python%{python3_pkgversion}-%{srcname}
Summary:        %{summary}
BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  python%{python3_pkgversion}-distlib >= 0.2.5
BuildRequires:  python%{python3_pkgversion}-empy
BuildRequires:  python%{python3_pkgversion}-mock
BuildRequires:  python%{python3_pkgversion}-pytest
BuildRequires:  python%{python3_pkgversion}-setuptools >= 30.3.0
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}

%if %{undefined __pythondist_requires}
Requires:       python%{python3_pkgversion}-distlib >= 0.2.5
Requires:       python%{python3_pkgversion}-empy
Requires:       python%{python3_pkgversion}-setuptools
%endif # __pythondist_requires

%if !0%{?rhel} || 0%{?rhel} >= 8
Recommends:     python%{python3_pkgversion}-coloredlogs
Recommends:     python%{python3_pkgversion}-pytest
Recommends:     python%{python3_pkgversion}-pytest-cov
Recommends:     python%{python3_pkgversion}-pytest-repeat
Recommends:     python%{python3_pkgversion}-pytest-runner
%if !0%{?fedora} || 0%{?fedora} >= 30
Recommends:     python%{python3_pkgversion}-pytest-rerunfailures
%endif # fedora
%else # rhel
Requires:       python%{python3_pkgversion}-coloredlogs
Requires:       python%{python3_pkgversion}-pytest
Requires:       python%{python3_pkgversion}-pytest-cov
Requires:       python%{python3_pkgversion}-pytest-repeat
Requires:       python%{python3_pkgversion}-pytest-runner
%endif # rhel

%description -n python%{python3_pkgversion}-%{srcname}
colcon is a command line tool to improve the workflow of building, testing and
using multiple software packages. It automates the process, handles the ordering
and sets up the environment to use the packages.


%prep
%autosetup -p1 -n %{srcname}-%{version}


%build
%py3_build


%install
%py3_install


%check
%if (0%{?fedora:1} && 0%{?fedora} < 30) || 0%{?rhel:1}
%global skip_old_pytest --ignore=test/test_build_python.py
%endif # fedora < 30 || rhel

%{__python3} -m pytest \
    --ignore=test/test_spell_check.py \
    --ignore=test/test_flake8.py \
    %{?skip_old_pytest} \
    test


%files -n python%{python3_pkgversion}-%{srcname}
%license LICENSE
%doc README.rst
%{python3_sitelib}/colcon/
%{python3_sitelib}/colcon_core/
%{python3_sitelib}/colcon_core-%{version}-py%{python3_version}.egg-info/
%{_bindir}/colcon


%changelog
* Fri Oct 11 2019 Scott K Logan <logans@cottsay.net> - 0.4.1-2
- Skip a new test on platforms with older pytest

* Fri Oct 11 2019 Scott K Logan <logans@cottsay.net> - 0.4.1-1
- Update to 0.4.1

* Thu Aug 29 2019 Scott K Logan <logans@cottsay.net> - 0.4.0-1
- Update to 0.4.0 (rhbz#1747248)

* Tue Jul 16 2019 Scott K Logan <logans@cottsay.net> - 0.3.23-1
- Update to 0.3.23

* Mon May 20 2019 Scott K Logan <logans@cottsay.net> - 0.3.22-1
- Update to 0.3.22

* Fri Apr 26 2019 Scott K Logan <logans@cottsay.net> - 0.3.20-2
- Drop obsolete Group

* Fri Apr 26 2019 Scott K Logan <logans@cottsay.net> - 0.3.20-1
- Update to 0.3.20
- Rebuilt to change main python from 3.4 to 3.6 in EPEL 7

* Mon Mar 18 2019 Scott K Logan <logans@cottsay.net> - 0.3.19-1
- Update to 0.3.19

* Fri Mar 01 2019 Scott K Logan <logans@cottsay.net> - 0.3.18-1
- Update to 0.3.18
- Handle automatic dependency generation (f30+)
- Make pytest and coloredlogs dependencies weak for Fedora

* Mon Feb 11 2019 Scott K Logan <logans@cottsay.net> - 0.3.17-2
- Enable tests on EPEL 7
- Move pytest-cov to Recommends
- Remove pylint from BuildRequires because those tests are skipped
- Target tests at the 'test' subdirectory specifically

* Fri Feb 08 2019 Scott K Logan <logans@cottsay.net> - 0.3.17-1
- Update to 0.3.17

* Mon Feb 04 2019 Scott K Logan <logans@cottsay.net> - 0.3.16-1
- Update to 0.3.16

* Wed Jan 16 2019 Scott K Logan <logans@cottsay.net> - 0.3.15-1
- Update to 0.3.15

* Thu Dec 13 2018 Scott K Logan <logans@cottsay.net> - 0.3.14-1
- Update to 0.3.14

* Wed Nov 21 2018 Scott K Logan <logans@cottsay.net> - 0.3.13-2
- Add Requires: pytest{,-cov,-runner} to satisfy requires.txt

* Fri Nov 09 2018 Scott K Logan <logans@cottsay.net> - 0.3.13-1
- Update to 0.3.13

* Wed Oct 31 2018 Scott K Logan <logans@cottsay.net> - 0.3.12-1
- Update to 0.3.12

* Mon Oct 29 2018 Scott K Logan <logans@cottsay.net> - 0.3.10-3
- Allow both deprecation and pending deprecation warnings

* Mon Oct 29 2018 Scott K Logan <logans@cottsay.net> - 0.3.10-2
- Add patch to allow deprecations (nothing we can do from here)

* Sat Oct 27 2018 Scott K Logan <logans@cottsay.net> - 0.3.10-1
- Update to 0.3.10

* Thu Sep 20 2018 Scott K Logan <logans@cottsay.net> - 0.3.9-1
- Initial package