fdc8cf2
%global srcname osrf_pycommon
fdc8cf2
%global pkgname osrf-pycommon
fdc8cf2
fdc8cf2
Name:           python-%{pkgname}
900b1ef
Version:        2.1.4
85ca23f
Release:        3%{?dist}
a062b4b
Summary:        Commonly needed Python modules used by software developed at OSRF
fdc8cf2
fdc8cf2
# The entire source code is ASL 2.0 except parts of osrf_pycommon/terminal_color/windows.py which is BSD
fdc8cf2
License:        ASL 2.0 and BSD
fdc8cf2
URL:            http://osrf-pycommon.readthedocs.org/
12f7b3e
Source0:        https://github.com/osrf/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz
fdc8cf2
4cf8a43
# Don't attempt to query a webserver for intersphinx inventory
4cf8a43
Patch0:         osrf_pycommon-2.0.0-intersphinx.patch
4cf8a43
fdc8cf2
BuildArch:      noarch
fdc8cf2
fdc8cf2
%description
fdc8cf2
osrf_pycommon is a python package which contains commonly used Python
fdc8cf2
boilerplate code and patterns. Things like ANSI terminal coloring, capturing
fdc8cf2
colored output from programs using sub-process, or even a simple logging system
fdc8cf2
which provides some nice functionality over the built-in Python logging system.
fdc8cf2
fdc8cf2
The functionality provided here should be generic enough to be reused in
fdc8cf2
arbitrary scenarios and should avoid bringing in dependencies which are not
fdc8cf2
part of the standard Python library. Where possible Windows and Linux/OS X
fdc8cf2
should be supported, and where it cannot it should be gracefully degrading.
fdc8cf2
12f7b3e
fdc8cf2
%package doc
fdc8cf2
Summary:        API Documentation for the osrf_pycommon Python modules
2cceab6
BuildRequires:  make
12f7b3e
BuildRequires:  python%{python3_pkgversion}-sphinx
fdc8cf2
fdc8cf2
%description doc
fdc8cf2
HTML documentation generated from osrf_pycommon sources to be used in
fdc8cf2
developing software which uses osrf_pycommon.
fdc8cf2
12f7b3e
a062b4b
%package -n python%{python3_pkgversion}-%{pkgname}
a062b4b
Summary:        %{summary}
a062b4b
BuildRequires:  python%{python3_pkgversion}-devel
bd7aada
%if 0%{?rhel} && 0%{?rhel} < 9
bd7aada
BuildRequires:  python%{python3_pkgversion}-importlib-metadata
bd7aada
%endif
bd7aada
BuildRequires:  python%{python3_pkgversion}-pytest
a062b4b
BuildRequires:  python%{python3_pkgversion}-setuptools
a062b4b
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pkgname}}
a062b4b
635d814
%if !0%{?rhel} || 0%{?rhel} >= 8
12f7b3e
Suggests:       %{name}-doc = %{version}-%{release}
635d814
%endif
a062b4b
a062b4b
%description -n python%{python3_pkgversion}-%{pkgname}
fdc8cf2
osrf_pycommon is a python package which contains commonly used Python
fdc8cf2
boilerplate code and patterns. Things like ANSI terminal coloring, capturing
fdc8cf2
colored output from programs using sub-process, or even a simple logging system
fdc8cf2
which provides some nice functionality over the built-in Python logging system.
fdc8cf2
fdc8cf2
The functionality provided here should be generic enough to be reused in
fdc8cf2
arbitrary scenarios and should avoid bringing in dependencies which are not
fdc8cf2
part of the standard Python library. Where possible Windows and Linux/OS X
fdc8cf2
should be supported, and where it cannot it should be gracefully degrading.
fdc8cf2
12f7b3e
fdc8cf2
%prep
a062b4b
%autosetup -p1 -n %{srcname}-%{version}
1dce64e
c9d60b4
# Don't install the package.xml
c9d60b4
sed -i "\\|'share/' + package_name, \\['package.xml'\\]|d" setup.py
c9d60b4
19d3672
# Don't install the resource marker
19d3672
sed -i "\\|('share/ament_index/resource_index/packages',|$!{
19d3672
  N
19d3672
  \\|('share/ament_index/resource_index/packages',\n *\\['resource/' + package_name\\])|d
19d3672
  }" setup.py
12f7b3e
635d814
fdc8cf2
%build
fdc8cf2
%py3_build
fdc8cf2
12f7b3e
%make_build -C docs html man SPHINXBUILD=sphinx-build-%{python3_version}
fdc8cf2
rm docs/_build/html/.buildinfo
fdc8cf2
c9d60b4
fdc8cf2
%install
fdc8cf2
%py3_install
fdc8cf2
fdc8cf2
install -p -m0644 -D docs/_build/man/%{srcname}.1 %{buildroot}%{_mandir}/man1/%{srcname}.1
fdc8cf2
c9d60b4
fdc8cf2
%check
bd7aada
%pytest tests -k 'not test_code_format'
fdc8cf2
12f7b3e
fdc8cf2
%files doc
fdc8cf2
%license LICENSE
a062b4b
%doc docs/_build/html
fdc8cf2
a062b4b
%files -n python%{python3_pkgversion}-%{pkgname}
fdc8cf2
%license LICENSE
a062b4b
%doc CHANGELOG.rst README.md
fdc8cf2
%{python3_sitelib}/%{srcname}/
a062b4b
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/
a062b4b
%{_mandir}/man1/%{srcname}.1.gz
fdc8cf2
12f7b3e
fdc8cf2
%changelog
85ca23f
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.4-3
85ca23f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
85ca23f
be917b4
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.4-2
be917b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
be917b4
900b1ef
* Wed Aug 23 2023 Scott K Logan <logans@cottsay.net> - 2.1.4-1
900b1ef
- Update to 2.1.4 (rhbz#2233722)
900b1ef
f78fb9c
* Fri Jul 21 2023 Scott K Logan <logans@cottsay.net> - 2.1.3-1
f78fb9c
- Update to 2.1.3 (rhbz#2222415)
f78fb9c
43cde40
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.2-3
43cde40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
43cde40
0930564
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 2.1.2-2
0930564
- Rebuilt for Python 3.12
0930564
6e75c64
* Tue May 09 2023 Soctt K Logan <logans@cottsay.net> - 2.1.2-1
6e75c64
- Update to 2.1.2 (rhbz#2170020)
6e75c64
870233e
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2
870233e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
870233e
bd7aada
* Sun Oct 16 2022 Scott K Logan <logans@cottsay.net> - 2.1.0-1
bd7aada
- Update to 2.1.0 (rhbz#2054780)
bd7aada
- Switch from nose to pytest
bd7aada
- Drop Python 2 from spec file as it isn't supported upstream anymore
bd7aada
14cb7c2
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-3
14cb7c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
14cb7c2
7a0324f
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 2.0.0-2
7a0324f
- Rebuilt for Python 3.11
7a0324f
4cf8a43
* Sat Feb 12 2022 Rich Mattes <richmattes@gmail.com> - 2.0.0-1
4cf8a43
- Update to release 2.0.0
4cf8a43
- Resolves: rhbz#1987089
4cf8a43
- Resolves: rhbz#2026340
4cf8a43
c8972cf
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.1-4
c8972cf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
c8972cf
db8a61d
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.1-3
db8a61d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
db8a61d
de2cf45
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.2.1-2
de2cf45
- Rebuilt for Python 3.10
de2cf45
2cceab6
* Thu Feb 04 2021 Scott K Logan <logans@cottsay.net> - 0.2.1-1
2cceab6
- Update to 0.2.1 (rhbz#1905288)
2cceab6
a443242
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.10-4
a443242
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
a443242
1b8f970
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.10-3
1b8f970
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
1b8f970
a6a7b3a
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.1.10-2
a6a7b3a
- Rebuilt for Python 3.9
a6a7b3a
635d814
* Fri May 08 2020 Scott K Logan <logans@cottsay.net> - 0.1.10-1
635d814
- Update to 0.1.10 (rhbz#1833518)
635d814
4586c34
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.9-2
4586c34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
4586c34
19d3672
* Wed Oct 30 2019 Scott K Logan <logans@cottsay.net> - 0.1.9-1
19d3672
- Update to 0.1.9 (rhbz#1762208)
19d3672
c9d60b4
* Mon Sep 30 2019 Scott K Logan <logans@cottsay.net> - 0.1.8-1
c9d60b4
- Update to 0.1.8 (rhbz#1753048)
c9d60b4
7908f26
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.1.7-3
7908f26
- Rebuilt for Python 3.8
7908f26
2fbc97f
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.7-2
2fbc97f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
2fbc97f
12f7b3e
* Fri Apr 12 2019 Scott K Logan <logans@cottsay.net> - 0.1.7-1
12f7b3e
- Update to 0.1.7
12f7b3e
- Use Python 3 Sphinx
12f7b3e
a8c6011
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.6-3
a8c6011
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
a8c6011
a062b4b
* Tue Jan 15 2019 Scott K Logan <logans@cottsay.net> - 0.1.6-2
a062b4b
- Remove Python 2 subpackage from f30+ (rhbz#1666189)
a062b4b
76dab3b
* Thu Nov 15 2018 Scott K Logan <logans@cottsay.net> - 0.1.6-1
76dab3b
- Update to 0.1.6
76dab3b
76dab3b
* Fri Sep 14 2018 Scott K Logan <logans@cottsay.net> - 0.1.5-1
052d577
- Update to 0.1.5 (rhbz#1593273)
052d577
903347e
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.4-3
903347e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
903347e
f649e08
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.1.4-2
f649e08
- Rebuilt for Python 3.7
f649e08
7b1ab1e
* Sun May 27 2018 Rich Mates <richmattes@gmail.com> - 0.1.4-1
7b1ab1e
- Update to release 0.1.4 (rhbz#1459873)
7b1ab1e
- Remove upstream flake8 compatibility patch (rhbz#1377139)
7b1ab1e
cced2f9
* Mon Mar 26 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.1.2-7
cced2f9
- Update Python 2 dependency declarations to new packaging standards
cced2f9
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
cced2f9
6c0de0d
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-6
6c0de0d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
6c0de0d
8824037
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-5
8824037
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
8824037
97947f9
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-4
97947f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
97947f9
c93afea
* Wed Dec 21 2016 Rich Mattes <richmattes@gmail.com> - 0.1.2-3
c93afea
- Fix FTBFS by adding upstream patch to use flake8 command line (rhbz#1377139)
c93afea
- Use 'python3-flake8' for python 3 tests
c93afea
c920490
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.1.2-3
c920490
- Rebuild for Python 3.6
c920490
531f629
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.2-2
531f629
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
531f629
fdc8cf2
* Mon Apr 18 2016 Scott K Logan <logans@cottsay.net> - 0.1.2-1
fdc8cf2
- Initial package