From 8289053f37ebe4579cec8093b75cff8e44aff424 Mon Sep 17 00:00:00 2001 From: Alfredo Moralejo Date: Sep 07 2021 08:10:26 +0000 Subject: Import python-versiontools-1.9.1-28.el9 in CloudSIG xena --- diff --git a/.python-versiontools.metadata b/.python-versiontools.metadata new file mode 100644 index 0000000..34eb1a1 --- /dev/null +++ b/.python-versiontools.metadata @@ -0,0 +1 @@ +53c18922da0820f5245ac39cd5b8e652c026678e SOURCES/versiontools-1.9.1.tar.gz diff --git a/SOURCES/python-versiontools-py35.patch b/SOURCES/python-versiontools-py35.patch new file mode 100644 index 0000000..32ba894 --- /dev/null +++ b/SOURCES/python-versiontools-py35.patch @@ -0,0 +1,18 @@ +diff -up versiontools-1.9.1/versiontools/tests.py.bak versiontools-1.9.1/versiontools/tests.py +--- versiontools-1.9.1/versiontools/tests.py.bak 2015-11-17 11:27:39.633889953 +0100 ++++ versiontools-1.9.1/versiontools/tests.py 2015-11-17 11:27:56.118772763 +0100 +@@ -140,14 +140,3 @@ class HandleVersionTests(TestCase): + else: + self.assertEqual(str(e), "Unable to import 'nonexisting': " + "No module named 'nonexisting'") +- +- def test_not_found(self): +- version = ':versiontools:versiontools:__nonexisting__' +- try: +- handle_version(self.dist, None, version) +- except Exception: +- e = sys.exc_info()[1] +- self.assertTrue(isinstance(e, DistutilsSetupError)) +- self.assertEqual(str(e), "Unable to access '__nonexisting__' in " +- "'versiontools': 'module' object has " +- "no attribute '__nonexisting__'") diff --git a/SOURCES/versiontools-1.9.1-py34-tests.patch b/SOURCES/versiontools-1.9.1-py34-tests.patch new file mode 100644 index 0000000..9e15458 --- /dev/null +++ b/SOURCES/versiontools-1.9.1-py34-tests.patch @@ -0,0 +1,26 @@ +--- versiontools/tests.py.orig 2015-05-27 16:53:42.497134369 -0500 ++++ versiontools/tests.py 2015-05-27 17:04:26.721049909 -0500 +@@ -23,7 +23,7 @@ + from unittest import TestCase + + from versiontools import Version +-from versiontools.setuptools_hooks import version as handle_version ++from versiontools.setuptools_hooks import version as handle_version + + + class VersionFormattingTests(TestCase): +@@ -134,8 +134,12 @@ + except Exception: + e = sys.exc_info()[1] + self.assertTrue(isinstance(e, DistutilsSetupError)) +- self.assertEqual(str(e), "Unable to import 'nonexisting': " +- "No module named nonexisting") ++ if sys.version_info[:1] < (3,): ++ self.assertEqual(str(e), "Unable to import 'nonexisting': " ++ "No module named nonexisting") ++ else: ++ self.assertEqual(str(e), "Unable to import 'nonexisting': " ++ "No module named 'nonexisting'") + + def test_not_found(self): + version = ':versiontools:versiontools:__nonexisting__' diff --git a/SPECS/python-versiontools.spec b/SPECS/python-versiontools.spec new file mode 100644 index 0000000..870764f --- /dev/null +++ b/SPECS/python-versiontools.spec @@ -0,0 +1,155 @@ + +%global pypi_name versiontools + +Name: python-versiontools +Version: 1.9.1 +Release: 28%{?dist} +Summary: Smart replacement for plain tuple used in __version__ + +License: LGPLv3 +URL: https://launchpad.net/versiontools +Source0: https://pypi.python.org/packages/source/v/versiontools/versiontools-1.9.1.tar.gz + +# Update tests for python 3.4 +Patch0: versiontools-1.9.1-py34-tests.patch +Patch1: python-versiontools-py35.patch + +BuildArch: noarch +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-sphinx +BuildRequires: python3-nose + +%global _description\ +%{summary} + +%description %_description + +%package -n python3-%{pypi_name} +Summary: Smart replacement for plain tuple used in __version__ + +%description -n python3-%{pypi_name} +%{summary} + +%prep +%setup -q -n %{pypi_name}-%{version} +%patch0 -p0 +%patch1 -p1 + +# remove bundled egg-info +rm -rf %{pypi_name}.egg-info +# generate html docs +sphinx-build doc html +# remove the sphinx-build leftovers +rm -rf html/.{doctrees,buildinfo} + +find . -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' + +%build + +%{__python3} setup.py build + +%install + +%{__python3} setup.py install -O1 --skip-build --root %{buildroot} + +%check + +PYTHONPATH="${PWD}" %{__python3} setup.py nosetests + +%files -n python3-%{pypi_name} +%doc html +%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/%{pypi_name}-%{version}-py3*.egg-info + + +%changelog +* Wed Jan 27 2021 Fedora Release Engineering - 1.9.1-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 1.9.1-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 1.9.1-26 +- Rebuilt for Python 3.9 + +* Thu Jan 30 2020 Fedora Release Engineering - 1.9.1-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Oct 03 2019 Miro Hrončok - 1.9.1-24 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Mon Aug 19 2019 Miro Hrončok - 1.9.1-23 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 1.9.1-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 1.9.1-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Jan 09 2019 Miro Hrončok - 1.9.1-20 +- Subpackage python2-versiontools has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + +* Sat Jul 14 2018 Fedora Release Engineering - 1.9.1-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 1.9.1-18 +- Rebuilt for Python 3.7 + +* Fri Feb 09 2018 Fedora Release Engineering - 1.9.1-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Jan 31 2018 Iryna Shcherbina - 1.9.1-16 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 1.9.1-15 +- Python 2 binary package renamed to python2-versiontools + See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 + +* Thu Jul 27 2017 Fedora Release Engineering - 1.9.1-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 1.9.1-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Dec 19 2016 Miro Hrončok - 1.9.1-12 +- Rebuild for Python 3.6 + +* Tue Jul 19 2016 Fedora Release Engineering - 1.9.1-11 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Thu Feb 04 2016 Fedora Release Engineering - 1.9.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Nov 17 2015 Matthias Runge - 1.9.1-9 +- make python3 tests pass + +* Tue Nov 10 2015 Fedora Release Engineering - 1.9.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Thu Jun 18 2015 Fedora Release Engineering - 1.9.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed May 27 2015 Adam Miller - 1.9.1-7 +- Update package to provide python3 version as well + +* Sun Jun 08 2014 Fedora Release Engineering - 1.9.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sun Aug 04 2013 Fedora Release Engineering - 1.9.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 1.9.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sat Jul 21 2012 Fedora Release Engineering - 1.9.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri May 04 2012 Bohuslav Kabrda - 1.9.1-2 +- Be more explicit in %%files section. + +* Thu May 03 2012 Bohuslav Kabrda - 1.9.1-1 +- Initial package.