From bafc6f6daa13b4afef027f848f5e3853860bb116 Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Oct 17 2022 00:58:59 +0000 Subject: Update to 2.1.0 Also: - Switch from nose to pytest - Drop Python 2 from spec file as it isn't supported upstream anymore --- diff --git a/.gitignore b/.gitignore index 79dc67d..c35fdac 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /osrf_pycommon-0.1.9.tar.gz /osrf_pycommon-0.1.10.tar.gz /osrf_pycommon-0.2.1.tar.gz +/osrf_pycommon-2.1.0.tar.gz diff --git a/osrf_pycommon-2.0.0-intersphinx.patch b/osrf_pycommon-2.0.0-intersphinx.patch new file mode 100644 index 0000000..87b1c66 --- /dev/null +++ b/osrf_pycommon-2.0.0-intersphinx.patch @@ -0,0 +1,9 @@ +diff -up ./docs/conf.py.intersphinx ./docs/conf.py +--- ./docs/conf.py.intersphinx 2022-02-12 12:24:42.405448232 -0500 ++++ ./docs/conf.py 2022-02-12 12:25:01.966543855 -0500 +@@ -266,4 +266,4 @@ texinfo_documents = [ + + + # Example configuration for intersphinx: refer to the Python standard library. +-intersphinx_mapping = {'http://docs.python.org/': None} ++#intersphinx_mapping = {'http://docs.python.org/': None} diff --git a/python-osrf-pycommon.spec b/python-osrf-pycommon.spec index 8f6f111..e644e71 100644 --- a/python-osrf-pycommon.spec +++ b/python-osrf-pycommon.spec @@ -1,11 +1,8 @@ -%{?!_without_python2:%global with_python2 0%{?_with_python2:1} || !(0%{?rhel} >= 8 || 0%{?fedora} >= 30)} -%{?!_without_python3:%global with_python3 0%{?_with_python3:1} || !0%{?rhel} || 0%{?rhel} >= 7} - %global srcname osrf_pycommon %global pkgname osrf-pycommon Name: python-%{pkgname} -Version: 0.2.1 +Version: 2.1.0 Release: 1%{?dist} Summary: Commonly needed Python modules used by software developed at OSRF @@ -14,6 +11,9 @@ License: ASL 2.0 and BSD URL: http://osrf-pycommon.readthedocs.org/ Source0: https://github.com/osrf/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz +# Don't attempt to query a webserver for intersphinx inventory +Patch0: osrf_pycommon-2.0.0-intersphinx.patch + BuildArch: noarch %description @@ -38,43 +38,13 @@ HTML documentation generated from osrf_pycommon sources to be used in developing software which uses osrf_pycommon. -%if 0%{?with_python2} -%package -n python2-%{pkgname} -Summary: %{summary} -BuildRequires: python2-devel -BuildRequires: python2-mock -BuildRequires: python2-nose -BuildRequires: python2-setuptools -BuildRequires: python2-trollius -%{?python_provide:%python_provide python2-%{pkgname}} - -%if %{undefined __pythondist_requires} -Requires: python2-trollius -%endif - -%if !0%{?rhel} || 0%{?rhel} >= 8 -Suggests: %{name}-doc = %{version}-%{release} -%endif - -%description -n python2-%{pkgname} -osrf_pycommon is a python package which contains commonly used Python -boilerplate code and patterns. Things like ANSI terminal coloring, capturing -colored output from programs using sub-process, or even a simple logging system -which provides some nice functionality over the built-in Python logging system. - -The functionality provided here should be generic enough to be reused in -arbitrary scenarios and should avoid bringing in dependencies which are not -part of the standard Python library. Where possible Windows and Linux/OS X -should be supported, and where it cannot it should be gracefully degrading. -%endif - - -%if 0%{?with_python3} %package -n python%{python3_pkgversion}-%{pkgname} Summary: %{summary} BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: python%{python3_pkgversion}-mock -BuildRequires: python%{python3_pkgversion}-nose +%if 0%{?rhel} && 0%{?rhel} < 9 +BuildRequires: python%{python3_pkgversion}-importlib-metadata +%endif +BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-setuptools %{?python_provide:%python_provide python%{python3_pkgversion}-%{pkgname}} @@ -92,7 +62,6 @@ The functionality provided here should be generic enough to be reused in arbitrary scenarios and should avoid bringing in dependencies which are not part of the standard Python library. Where possible Windows and Linux/OS X should be supported, and where it cannot it should be gracefully degrading. -%endif %prep @@ -109,65 +78,40 @@ sed -i "\\|('share/ament_index/resource_index/packages',|$!{ %build -%if 0%{?with_python2} -%py2_build -%endif - -%if 0%{?with_python3} %py3_build -%endif %make_build -C docs html man SPHINXBUILD=sphinx-build-%{python3_version} rm docs/_build/html/.buildinfo %install -%if 0%{?with_python2} -%py2_install -rm -rf %{buildroot}%{python2_sitelib}/%{srcname}/process_utils/async_execute_process_asyncio -%endif - -%if 0%{?with_python3} %py3_install -%endif install -p -m0644 -D docs/_build/man/%{srcname}.1 %{buildroot}%{_mandir}/man1/%{srcname}.1 %check -%if 0%{?with_python2} -PYTHONASYNCIODEBUG=1 %{__python2} -m nose tests -e test_code_format -%endif - -%if 0%{?with_python3} -PYTHONASYNCIODEBUG=1 %{__python3} -m nose tests -e test_code_format -%endif +%pytest tests -k 'not test_code_format' %files doc %license LICENSE %doc docs/_build/html -%if 0%{?with_python2} -%files -n python2-%{pkgname} -%license LICENSE -%doc CHANGELOG.rst README.md -%{python2_sitelib}/%{srcname}/ -%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info/ -%{_mandir}/man1/%{srcname}.1.gz -%endif - -%if 0%{?with_python3} %files -n python%{python3_pkgversion}-%{pkgname} %license LICENSE %doc CHANGELOG.rst README.md %{python3_sitelib}/%{srcname}/ %{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/ %{_mandir}/man1/%{srcname}.1.gz -%endif %changelog +* Sun Oct 16 2022 Scott K Logan - 2.1.0-1 +- Update to 2.1.0 (rhbz#2054780) +- Switch from nose to pytest +- Drop Python 2 from spec file as it isn't supported upstream anymore + * Thu Feb 04 2021 Scott K Logan - 0.2.1-1 - Update to 0.2.1 (rhbz#1905288) diff --git a/sources b/sources index a22c9a0..3f30ee5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (osrf_pycommon-0.2.1.tar.gz) = d05e6bcbb8e7b5506ea953d37c895dbca59765e9a26081aff2c4d213c02365a4254580843dd7624fe4a046afdb2d5b8935c1fcd4d60b6b1d71c4d22789d26371 +SHA512 (osrf_pycommon-2.1.0.tar.gz) = 6b260616947f52f2044e6db2d72e6109fd135451b11f77361ba6f534570f50e3613b159c78045e87719e6a4509ca70df138d76c1b3ef77de2fef9a8a9ec3d20b