diff --git a/.python-pkginfo.metadata b/.python-pkginfo.metadata new file mode 100644 index 0000000..326ef50 --- /dev/null +++ b/.python-pkginfo.metadata @@ -0,0 +1 @@ +4036ab842fc55315107ca8c4271010f385051943 SOURCES/pkginfo-1.5.0.1.tar.gz diff --git a/SOURCES/0001-disable-test-sub-package.patch b/SOURCES/0001-disable-test-sub-package.patch new file mode 100644 index 0000000..e0d5436 --- /dev/null +++ b/SOURCES/0001-disable-test-sub-package.patch @@ -0,0 +1,24 @@ +From 696c909e3ec857ea67b64563e88d0225d30b608b Mon Sep 17 00:00:00 2001 +From: Fabio Valentini +Date: Tue, 24 Sep 2019 16:50:23 +0200 +Subject: [PATCH 1/2] disable test sub-package + +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 1484186..e989e4b 100644 +--- a/setup.py ++++ b/setup.py +@@ -48,6 +48,6 @@ setup( + 'pkginfo = pkginfo.commandline:main', + ] + }, +- packages=['pkginfo', 'pkginfo.tests'], ++ packages=['pkginfo'], + **extras + ) +-- +2.21.0 + diff --git a/SOURCES/0002-disable-a-broken-test.patch b/SOURCES/0002-disable-a-broken-test.patch new file mode 100644 index 0000000..6f763a2 --- /dev/null +++ b/SOURCES/0002-disable-a-broken-test.patch @@ -0,0 +1,47 @@ +From 226b22453afeb7a26a837578fd28f316c611514e Mon Sep 17 00:00:00 2001 +From: Fabio Valentini +Date: Tue, 24 Sep 2019 16:52:16 +0200 +Subject: [PATCH 2/2] disable a broken test + +--- + pkginfo/tests/test_installed.py | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +diff --git a/pkginfo/tests/test_installed.py b/pkginfo/tests/test_installed.py +index 462f986..a8f7ff7 100644 +--- a/pkginfo/tests/test_installed.py ++++ b/pkginfo/tests/test_installed.py +@@ -44,18 +44,18 @@ class InstalledTests(unittest.TestCase): + else: + self.assertEqual(installed.metadata_version, '1.0') + +- def test_ctor_w_package_no_PKG_INFO(self): +- import sys +- import types +- import warnings +- with warnings.catch_warnings(record=True): +- installed = self._makeOne(types) +- self.assertEqual(installed.package, types) +- self.assertEqual(installed.package_name, 'types') +- if sys.version_info[:2] >= (3, 3): +- self.assertEqual(installed.metadata_version, '2.1') +- else: +- self.assertEqual(installed.metadata_version, None) ++# def test_ctor_w_package_no_PKG_INFO(self): ++# import sys ++# import types ++# import warnings ++# with warnings.catch_warnings(record=True): ++# installed = self._makeOne(types) ++# self.assertEqual(installed.package, types) ++# self.assertEqual(installed.package_name, 'types') ++# if sys.version_info[:2] >= (3, 3): ++# self.assertEqual(installed.metadata_version, '2.1') ++# else: ++# self.assertEqual(installed.metadata_version, None) + + def test_ctor_w_package_and_metadata_version(self): + import pkginfo +-- +2.21.0 + diff --git a/SPECS/python-pkginfo.spec b/SPECS/python-pkginfo.spec new file mode 100644 index 0000000..2073ec9 --- /dev/null +++ b/SPECS/python-pkginfo.spec @@ -0,0 +1,153 @@ +%global pypi_name pkginfo + +%global common_description %{expand: +This package provides an API for querying the distutils metadata written in the +PKG-INFO file inside a source distribution (an sdist) or a binary distribution +(e.g., created by running bdist_egg). It can also query the EGG-INFO directory +of an installed distribution, and the *.egg-info stored in a "development +checkout" (e.g, created by running setup.py develop).} + +Name: python-%{pypi_name} +Summary: Query metadata from sdists / bdists / installed packages +Version: 1.5.0.1 +Release: 7%{?dist} +License: MIT + +URL: https://pypi.python.org/pypi/%{pypi_name} +Source0: %{pypi_source} + +# don't ship internal test subpackage +Patch1: 0001-disable-test-sub-package.patch + +# disable one broken test +Patch2: 0002-disable-a-broken-test.patch + +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3dist(nose) +BuildRequires: python3dist(sphinx) + +%description %{common_description} + + +%package -n python3-%{pypi_name} +Summary: Query metadata from sdists / bdists / installed packages +Requires: python3-setuptools +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} %{common_description} + + +%package doc +Summary: Documentation for python-%{pypi_name} + +%description doc %{common_description} +This package contains the documentation. + + +%prep +%autosetup -n %{pypi_name}-%{version} -p1 + +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + + +%build +%py3_build + +# generate html docs +PYTHONPATH=${PWD} sphinx-build-3 docs html + +# remove the sphinx-build leftovers +rm -rf html/.{doctrees,buildinfo} + + +%install +%py3_install + + +%check +%{__python3} setup.py test + + +%files -n python3-%{pypi_name} +%license LICENSE.txt +%doc README.txt CHANGES.txt + +%{_bindir}/pkginfo + +%{python3_sitelib}/%{pypi_name}/ +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ + +%files -n python-%{pypi_name}-doc +%license LICENSE.txt +%doc html + + +%changelog +* Wed Jan 27 2021 Fedora Release Engineering - 1.5.0.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 1.5.0.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jun 26 2020 Fabian Affolter - 1.5.0.1-5 +- Revert previous changes + +* Fri Jun 26 2020 Fabian Affolter - 1.5.0.1-4 +- Add python3-setuptools as BR + +* Tue May 26 2020 Miro Hrončok - 1.5.0.1-3 +- Rebuilt for Python 3.9 + +* Thu Jan 30 2020 Fedora Release Engineering - 1.5.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Sep 24 2019 Fabio Valentini - 1.5.0.1-1 +- Update to version 1.5.0.1. + +* Mon Sep 23 2019 Fabio Valentini - 1.4.2-7 +- Drop python2-pkginfo and versioned symlinks for the binary. + +* Mon Aug 19 2019 Miro Hrončok - 1.4.2-6 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 1.4.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 1.4.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 1.4.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 1.4.2-2 +- Rebuilt for Python 3.7 + +* Sat Mar 24 2018 Jeremy Cline - 1.4.2-1 +- Update to latest upstream +- License change to MIT + +* Fri Feb 09 2018 Fedora Release Engineering - 1.3.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1.3.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 1.3.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Dec 19 2016 Miro Hrončok - 1.3.2-4 +- Rebuild for Python 3.6 + +* Wed Jul 20 2016 Jeremy Cline - 1.3.2-3 +- Remove hard-coded Python y release versions in /usr/bin entries + +* Tue Jul 19 2016 Fedora Release Engineering - 1.3.2-2 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Thu Jun 09 2016 Jeremy Cline - 1.3.2-1 +- Initial commit +