Filip Szymański 52c9635
%global srcname ansicolor
Filip Szymański 52c9635
%global desc %{srcname} is a library to produce ANSI color output, colored highlighting\
Filip Szymański 52c9635
and diffing.
Filip Szymański 52c9635
d5ee7c5
d5ee7c5
%if 0%{?fedora}
d5ee7c5
  %bcond_without python3
d5ee7c5
  %if 0%{?fedora} > 29
d5ee7c5
    %bcond_with python2
d5ee7c5
  %else
d5ee7c5
    %bcond_without python2
d5ee7c5
  %endif
d5ee7c5
%else
d5ee7c5
  %if 0%{?rhel} > 7
d5ee7c5
    %bcond_with    python2
d5ee7c5
    %bcond_without python3
d5ee7c5
  %else
d5ee7c5
    %bcond_without python2
d5ee7c5
    %bcond_with    python3
d5ee7c5
  %endif
d5ee7c5
%endif
d5ee7c5
d5ee7c5
Filip Szymański 52c9635
Name:           python-%{srcname}
Filip Szymański 52c9635
Version:        0.2.4
5d673f6
Release:        29%{?dist}
Filip Szymański 52c9635
Summary:        A library to produce ANSI color output
Filip Szymański 52c9635
Filip Szymański 52c9635
License:        ASL 2.0
Filip Szymański 52c9635
URL:            https://github.com/numerodix/%{srcname}
Filip Szymański 52c9635
Source0:        https://github.com/numerodix/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz
Filip Szymański 52c9635
Filip Szymański 52c9635
BuildArch:      noarch
fd5b6bb
BuildRequires:  make
d5ee7c5
%if %{with python2}
Filip Szymański 52c9635
BuildRequires:  python2-devel
Filip Szymański 52c9635
BuildRequires:  python2-pytest
Filip Szymański 52c9635
BuildRequires:  python2-setuptools
d5ee7c5
BuildRequires:  python2-sphinx
d5ee7c5
%endif
d5ee7c5
%if %{with python3}
d5ee7c5
BuildRequires:  python3-devel
d5ee7c5
BuildRequires:  python3-pytest
Filip Szymański 52c9635
BuildRequires:  python3-setuptools
Filip Szymański 52c9635
BuildRequires:  python3-sphinx
d5ee7c5
%endif
Filip Szymański 52c9635
Filip Szymański 52c9635
%description
Filip Szymański 52c9635
%{desc}
Filip Szymański 52c9635
d5ee7c5
d5ee7c5
%if %{with python2}
Filip Szymański 52c9635
%package -n python2-%{srcname}
Filip Szymański 52c9635
Summary:        %{summary}
Filip Szymański 52c9635
%{?python_provide:%python_provide python2-%{srcname}}
Filip Szymański 52c9635
Filip Szymański 52c9635
%description -n python2-%{srcname}
Filip Szymański 52c9635
%{desc}
d5ee7c5
%endif
d5ee7c5
Filip Szymański 52c9635
d5ee7c5
%if %{with python3}
Filip Szymański 52c9635
%package -n python3-%{srcname}
Filip Szymański 52c9635
Summary:        %{summary}
Filip Szymański 52c9635
%{?python_provide:%python_provide python3-%{srcname}}
Filip Szymański 52c9635
Filip Szymański 52c9635
%description -n python3-%{srcname}
Filip Szymański 52c9635
%{desc}
d5ee7c5
%endif
d5ee7c5
Filip Szymański 52c9635
Filip Szymański 52c9635
%package doc
Filip Szymański 91aa924
Summary:        Documentation for %{name}
Filip Szymański 52c9635
Filip Szymański 52c9635
%description doc
Filip Szymański 91aa924
This package contains the documentation for %{name}.
Filip Szymański 52c9635
d5ee7c5
Filip Szymański 52c9635
%prep
Filip Szymański 52c9635
%autosetup -n %{srcname}-%{version}
Filip Szymański 52c9635
d5ee7c5
Filip Szymański 52c9635
%build
d5ee7c5
%{?with_python2:%py2_build}
d5ee7c5
%{?with_python3:%py3_build}
Filip Szymański 52c9635
Filip Szymański 52c9635
PYTHONPATH=$(pwd) ./build_docs.sh
Filip Szymański 52c9635
rm -f docs/_build/html/.buildinfo
Filip Szymański 52c9635
d5ee7c5
Filip Szymański 52c9635
%install
d5ee7c5
%{?with_python2:%py2_install}
d5ee7c5
%{?with_python3:%py3_install}
d5ee7c5
Filip Szymański 52c9635
Filip Szymański 52c9635
%check
d5ee7c5
%{?with_python2:py.test-%{python2_version} -v}
d5ee7c5
%{?with_python3:py.test-%{python3_version} -v}
d5ee7c5
Filip Szymański 52c9635
d5ee7c5
%if %{with python2}
Filip Szymański 52c9635
%files -n python2-%{srcname}
Filip Szymański 52c9635
%license LICENSE
Filip Szymański 52c9635
%doc README.rst
Filip Szymański 52c9635
%{python2_sitelib}/*
d5ee7c5
%endif
Filip Szymański 52c9635
d5ee7c5
%if %{with python3}
Filip Szymański 52c9635
%files -n python3-%{srcname}
Filip Szymański 52c9635
%license LICENSE
Filip Szymański 52c9635
%doc README.rst
Filip Szymański 52c9635
%{python3_sitelib}/*
d5ee7c5
%endif
Filip Szymański 52c9635
Filip Szymański 52c9635
%files doc
Filip Szymański 52c9635
%license LICENSE
Filip Szymański 52c9635
%doc docs/_build/html/*
Filip Szymański 52c9635
d5ee7c5
Filip Szymański 52c9635
%changelog
5d673f6
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 0.2.4-29
5d673f6
- Rebuilt for Python 3.13
5d673f6
f795577
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-28
f795577
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
f795577
8bf2240
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-27
8bf2240
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
8bf2240
e9dff96
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-26
e9dff96
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
e9dff96
4be6a2b
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 0.2.4-25
4be6a2b
- Rebuilt for Python 3.12
4be6a2b
6ab1044
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-24
6ab1044
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
6ab1044
20a219c
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-23
20a219c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
20a219c
f6d49d7
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.2.4-22
f6d49d7
- Rebuilt for Python 3.11
f6d49d7
93d915a
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-21
93d915a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
93d915a
3e10e16
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-20
3e10e16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
3e10e16
3fc6a48
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.2.4-19
3fc6a48
- Rebuilt for Python 3.10
3fc6a48
fd5b6bb
* Tue Feb 16 2021 Miro Hrončok <mhroncok@redhat.com> - 0.2.4-18
fd5b6bb
- BuildRequire make for https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
fd5b6bb
387ad52
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-17
387ad52
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
387ad52
b5afe1d
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-16
b5afe1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
b5afe1d
7a34cae
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.2.4-15
7a34cae
- Rebuilt for Python 3.9
7a34cae
892972c
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-14
892972c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
892972c
673d4c8
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.2.4-13
673d4c8
- Rebuilt for Python 3.8.0rc1 (#1748018)
673d4c8
297e5a9
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.2.4-12
297e5a9
- Rebuilt for Python 3.8
297e5a9
d1bd4be
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-11
d1bd4be
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
d1bd4be
4fc8869
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-10
4fc8869
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
4fc8869
d5ee7c5
* Tue Sep 18 2018 Pavel Raiskup <praiskup@redhat.com> - 0.2.4-9
d5ee7c5
- python3/python2 ifdefs so we can build for both Fedora/EPEL
d5ee7c5
- disable python2 package on f30+ (rhbz#1630071)
d5ee7c5
750650f
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-8
750650f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
750650f
48af383
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.2.4-7
48af383
- Rebuilt for Python 3.7
48af383
3190103
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-6
3190103
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
3190103
5f3934e
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-5
5f3934e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
5f3934e
619349d
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-4
619349d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
619349d
Filip Szymański 52c9635
* Thu Jan 05 2017 Filip Szymański <fszymanski at, fedoraproject.org> - 0.2.4-3
Filip Szymański 52c9635
- Fix spelling errors
Filip Szymański 52c9635
Filip Szymański 52c9635
* Thu Jan 05 2017 Filip Szymański <fszymanski at, fedoraproject.org> - 0.2.4-2
Filip Szymański 52c9635
- Use %%{summary} macro
Filip Szymański 52c9635
- Add license file to -doc subpackage
Filip Szymański 52c9635
Filip Szymański 52c9635
* Tue Dec 20 2016 Filip Szymański <fszymanski at, fedoraproject.org> - 0.2.4-1
Filip Szymański 52c9635
- Initial release