diff --git a/.python-gitdb.metadata b/.python-gitdb.metadata new file mode 100644 index 0000000..e350471 --- /dev/null +++ b/.python-gitdb.metadata @@ -0,0 +1 @@ +014e4b4832130ed0ecad68fb6619a0496b08a98a SOURCES/gitdb-4.0.9.tar.gz diff --git a/SOURCES/0001-Switch-from-nose-to-pytest.patch b/SOURCES/0001-Switch-from-nose-to-pytest.patch new file mode 100644 index 0000000..11de655 --- /dev/null +++ b/SOURCES/0001-Switch-from-nose-to-pytest.patch @@ -0,0 +1,72 @@ +From bed1b63e69b38baa25caf1ebc40571f57d8b759b Mon Sep 17 00:00:00 2001 +From: Carl George +Date: Wed, 9 Feb 2022 17:31:27 -0600 +Subject: [PATCH] Switch from nose to pytest + +This is not a full rewrite to pytest style tests, it just changes the +minimum to allow pytest to run the existing tests. +--- + gitdb/test/db/test_pack.py | 4 ++-- + gitdb/test/lib.py | 4 ++-- + gitdb/test/test_pack.py | 4 ++-- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/gitdb/test/db/test_pack.py b/gitdb/test/db/test_pack.py +index 458d804..7959442 100644 +--- a/gitdb/test/db/test_pack.py ++++ b/gitdb/test/db/test_pack.py +@@ -16,7 +16,7 @@ import os + import random + import sys + +-from nose.plugins.skip import SkipTest ++import pytest + + class TestPackDB(TestDBBase): + +@@ -24,7 +24,7 @@ class TestPackDB(TestDBBase): + @with_packs_rw + def test_writing(self, path): + if sys.platform == "win32": +- raise SkipTest("FIXME: Currently fail on windows") ++ pytest.skip("FIXME: Currently fail on windows") + + pdb = PackedDB(path) + +diff --git a/gitdb/test/lib.py b/gitdb/test/lib.py +index a04084f..abd4ad5 100644 +--- a/gitdb/test/lib.py ++++ b/gitdb/test/lib.py +@@ -65,8 +65,8 @@ def skip_on_travis_ci(func): + @wraps(func) + def wrapper(self, *args, **kwargs): + if 'TRAVIS' in os.environ: +- import nose +- raise nose.SkipTest("Cannot run on travis-ci") ++ import pytest ++ pytest.skip("Cannot run on travis-ci") + # end check for travis ci + return func(self, *args, **kwargs) + # end wrapper +diff --git a/gitdb/test/test_pack.py b/gitdb/test/test_pack.py +index 48a1852..81a6bfc 100644 +--- a/gitdb/test/test_pack.py ++++ b/gitdb/test/test_pack.py +@@ -26,7 +26,7 @@ from gitdb.fun import delta_types + from gitdb.exc import UnsupportedOperation + from gitdb.util import to_bin_sha + +-from nose import SkipTest ++import pytest + + import os + import tempfile +@@ -246,4 +246,4 @@ class TestPack(TestBase): + def test_pack_64(self): + # TODO: hex-edit a pack helping us to verify that we can handle 64 byte offsets + # of course without really needing such a huge pack +- raise SkipTest() ++ pytest.skip('not implemented') +-- +2.34.1 + diff --git a/SPECS/python-gitdb.spec b/SPECS/python-gitdb.spec new file mode 100644 index 0000000..4f97176 --- /dev/null +++ b/SPECS/python-gitdb.spec @@ -0,0 +1,202 @@ +%global srcname gitdb + +Name: python-%{srcname} +Version: 4.0.9 +Release: 2%{?dist} +Summary: Git Object Database + +License: BSD +URL: https://github.com/gitpython-developers/gitdb +Source0: %pypi_source +# https://github.com/gitpython-developers/gitdb/pull/79 +Patch0: 0001-Switch-from-nose-to-pytest.patch + +BuildArch: noarch + +BuildRequires: git-core + +%global _description %{expand: +GitDB allows you to access bare git repositories for reading and writing. +It aims at allowing full access to loose objects as well as packs with +performance and scalability in mind. It operates exclusively on streams, +allowing to handle large objects with a small memory footprint.} + +%description %{_description} + +%package -n python3-%{srcname} +Summary: %{summary} +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros +BuildRequires: %{py3_dist pytest} + +%description -n python3-%{srcname} %{_description} + +%prep +%autosetup -n %{srcname}-%{version} -p 1 + +%generate_buildrequires +%pyproject_buildrequires + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files %{srcname} + +%check +# The tests require a git repo with a substantial number of objects. +# https://github.com/gitpython-developers/gitdb/issues/16 +mkdir testrepo +pushd testrepo +git init -q +git config user.email "%{name}-owner@fedoraproject.org" +git config user.name "%{name} maintainer" +for i in {1..400}; do echo $i > $i; git add $i; git commit -q -m "$i"; done +git gc +popd + +export GITDB_TEST_GIT_REPO_BASE=testrepo/.git +%pytest --verbose + +%files -n python3-%{srcname} -f %{pyproject_files} +%doc AUTHORS + +%changelog +* Thu Feb 10 2022 Carl George - 4.0.9-2 +- Convert to pyproject macros +- Fix test suite + +* Wed Feb 09 2022 Joel Capitao - 4.0.9-1 +- New upstream release 4.0.9 (#1943332) + +* Wed Feb 09 2022 Troy Dawson - 4.0.5-6 +- Switch from python3-nose to python3-pytest for testing + +* Fri Jan 21 2022 Fedora Release Engineering - 4.0.5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 4.0.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 4.0.5-3 +- Rebuilt for Python 3.10 + +* Wed Jan 27 2021 Fedora Release Engineering - 4.0.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Jan 07 2021 Joel Capitao - 4.0.5-1 +- New upstream release 4.0.5 (#1806853) + +* Wed Jul 29 2020 Fedora Release Engineering - 4.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sun May 24 2020 Miro Hrončok - 4.0.1-2 +- Rebuilt for Python 3.9 + +* Mon Feb 24 2020 Lubomír Sedlář - 4.0.1-1 +- New upstream release 4.0.1 + +* Thu Jan 30 2020 Fedora Release Engineering - 2.0.3-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Jan 08 2020 Lubomír Sedlář - 2.0.3-10 +- Fix build with Python 3.9 + +* Thu Oct 03 2019 Miro Hrončok - 2.0.3-9 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Fri Aug 16 2019 Miro Hrončok - 2.0.3-8 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 2.0.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Wed Jun 26 2019 Petr Viktorin - 2.0.3-6 +- Remove Python 2 subpackage + https://bugzilla.redhat.com/show_bug.cgi?id=1723967 +- Run tests using a specific Python interpreter, rather than rely on command name +- Re-enable passing tests + +* Sat Feb 02 2019 Fedora Release Engineering - 2.0.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 2.0.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Sun Jun 17 2018 Miro Hrončok - 2.0.3-3 +- Rebuilt for Python 3.7 + +* Fri Feb 09 2018 Fedora Release Engineering - 2.0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Sep 30 2017 Igor Gnatenko - 2.0.3-1 +- Update to 2.0.3 + +* Tue Aug 08 2017 Igor Gnatenko - 2.0.2-1 +- Update to 2.0.2 + +* Thu Jul 27 2017 Fedora Release Engineering - 2.0.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 2.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Dec 28 2016 Igor Gnatenko - 2.0.0-1 +- Update to 2.0.0 +- Modernize spec + +* Mon Dec 19 2016 Miro Hrončok - 0.6.4-6 +- Rebuild for Python 3.6 + +* Tue Jul 19 2016 Fedora Release Engineering - 0.6.4-5 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Thu Feb 04 2016 Fedora Release Engineering - 0.6.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Nov 10 2015 Fedora Release Engineering - 0.6.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Thu Jun 18 2015 Fedora Release Engineering - 0.6.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue May 26 2015 Dennis Gilmore - 0.6.4-1 +- update to 0.6.4 +- enable python3 support + +* Sun Aug 17 2014 Fedora Release Engineering - 0.5.4-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 0.5.4-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sun Aug 04 2013 Fedora Release Engineering - 0.5.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 0.5.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sat Jul 21 2012 Fedora Release Engineering - 0.5.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 0.5.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Oct 17 2011 Jesse Keating - 0.5.4-2 +- Require python-smmap + +* Mon Jul 18 2011 Jesse Keating - 0.5.4-1 +- Upstream release to fix licensing issues +- Use real upstream release instead of git checkout +- No tests shipped in release, remove %check + +* Tue Jun 14 2011 Jesse Keating - 0.5.2-3.20110613git17d9d13 +- Add a br on python-async + +* Mon Jun 13 2011 Jesse Keating - 0.5.2-2.20110613git17d9d13 +- Fix perms and add a date to the release field. + +* Sat May 28 2011 Jesse Keating - 0.5.2-1.git17d9d13 +- Initial package +