Compare commits

..

No commits in common. 'i8c' and 'f39' have entirely different histories.
i8c ... f39

7
.gitignore vendored

@ -1 +1,6 @@
SOURCES/semantic_version-2.6.0.tar.gz
/semantic_version-2.4.1.tar.gz
/semantic_version-2.4.2.tar.gz
/semantic_version-2.5.0.tar.gz
/semantic_version-2.6.0.tar.gz
/semantic_version-2.8.4.tar.gz
/python-semanticversion-2.10.0.tar.gz

@ -1 +0,0 @@
6c7ee39e97a5ef1f61bc2be08e41ae3e80856908 SOURCES/semantic_version-2.6.0.tar.gz

@ -1,37 +0,0 @@
From 3bb7b0923a197f40ba9d3463c9340c2525c3f3ff Mon Sep 17 00:00:00 2001
From: "Brian C. Lane" <bcl@redhat.com>
Date: Mon, 16 Jul 2018 14:23:01 -0700
Subject: [PATCH] Fix django tests
When django isn't installed it shouldn't evaluate django.VERSION
otherwise it will crash. decorators are always evaluated, so this needs
to be short-circuited.
---
tests/test_django.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test_django.py b/tests/test_django.py
index 1c3c46a..489caf4 100644
--- a/tests/test_django.py
+++ b/tests/test_django.py
@@ -139,7 +139,7 @@ class DjangoFieldTestCase(unittest.TestCase):
self.assertEqual(Version('23.0.0'), obj2.version)
self.assertEqual(Version('0.1.2+3.4.5-6', partial=True), obj2.partial)
- @unittest.skipIf(django.VERSION[:2] < (1, 8), "Django<1.8 casts values on setattr")
+ @unittest.skipIf(django_loaded and django.VERSION[:2] < (1, 8), "Django<1.8 casts values on setattr")
def test_invalid_input(self):
v = models.VersionModel(version='0.1.1', spec='blah')
self.assertRaises(ValueError, v.full_clean)
@@ -147,7 +147,7 @@ class DjangoFieldTestCase(unittest.TestCase):
v2 = models.VersionModel(version='0.1', spec='==0.1.1,!=0.1.1-alpha')
self.assertRaises(ValueError, v2.full_clean)
- @unittest.skipUnless(django.VERSION[:2] < (1, 8), "Django>=1.8 doesn't mangle setattr")
+ @unittest.skipUnless(django_loaded and django.VERSION[:2] < (1, 8), "Django>=1.8 doesn't mangle setattr")
def test_invalid_input_full_clean(self):
self.assertRaises(ValueError, models.VersionModel, version='0.1.1', spec='blah')
self.assertRaises(ValueError, models.VersionModel, version='0.1', spec='==0.1.1,!=0.1.1-alpha')
--
2.17.1

@ -1,173 +0,0 @@
%global pypi_name semantic_version
%if 0%{?rhel} && 0%{?rhel} <= 7
%bcond_with python3
%else
%bcond_without python3
%endif
%if 0%{?rhel} > 7
# Disable python2 build by default
%bcond_with python2
%else
%bcond_without python2
%endif
Name: python-%{pypi_name}
Version: 2.6.0
Release: 5%{?dist}
Summary: Library implementing the 'SemVer' scheme
License: BSD
URL: https://github.com/rbarrois/python-semanticversion
Source0: %{url}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
Patch1: 0001-Fix-django-tests.patch
%global _description \
This small python library provides a few tools to handle semantic versioning\
in Python.
%description %{_description}
%if %{with python2}
%package -n python2-%{pypi_name}
Summary: %{summary}
BuildRequires: python2-devel
%if 0%{?rhel} && 0%{?rhel} <= 7
BuildRequires: python-setuptools
%else
BuildRequires: python2-setuptools
%endif
#BuildRequires: python2-django
%{?python_provide:%python_provide python2-%{pypi_name}}
Provides: python-semantic-version
%description -n python2-%{pypi_name} %{_description}
Python 2 version.
%endif # with python2
%if 0%{?with_python3}
%package -n python3-%{pypi_name}
Summary: %{summary}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
#BuildRequires: python3-django
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name} %{_description}
Python 3 version
%endif
%package doc
Summary: Documentation for python-%{pypi_name}
BuildRequires: python3-sphinx
%description doc
%{summary}.
%prep
%autosetup -p1 -n python-semanticversion-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
# documentation builds due to broken symlink
# https://github.com/rbarrois/python-semanticversion/issues/20
rm docs/credits.rst
%build
%if %{with python2}
%py2_build
%endif # with python2
%if %{with python3}
%py3_build
%endif
# generate html docs
sphinx-build-3 docs html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%install
%if %{with python2}
%py2_install
%endif # with python2
%if %{with python3}
%py3_install
%endif
%check
%if %{with python2}
%{__python2} setup.py test
%endif # with python2
%if %{with python3}
%{__python3} setup.py test
%endif
%if %{with python2}
%files -n python2-%{pypi_name}
%license LICENSE
%doc README.rst ChangeLog
%{python2_sitelib}/%{pypi_name}/
%{python2_sitelib}/%{pypi_name}-*.egg-info/
%endif # with python2
%if %{with python3}
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst ChangeLog
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-*.egg-info/
%endif
%files doc
%license LICENSE
%doc html
%changelog
* Wed Jul 26 2023 MSVSphere Packaging Team <packager@msvsphere.ru> - 2.6.0-5
- Rebuilt for MSVSphere 8.8
* Wed Jul 18 2018 Brian C. Lane <bcl@redhat.com> - 2.6.0-5
- Enable tests
- Fix django test, it should be skipped when django is not installed
* Wed Jul 18 2018 Charalampos Stratakis <cstratak@redhat.com> - 2.6.0-4
- Conditionalize the python2 subpackage
- Use python3-sphinx for docs
- Remove django dependency
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Sat Jan 28 2017 Igor Gnatenko <ignatenko@redhat.com> - 2.6.0-1
- Update to 2.6.0
- Make package to comply guidelines
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 2.5.0-3
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.0-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Wed Feb 24 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 2.5.0-1
- Upstream 2.5.0
- Add python3 subpackage
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Jul 03 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 2.4.2-1
- Upstream 2.4.2
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Apr 01 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 2.4.1-1
- Upstream 2.4.1
* Mon Mar 30 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 2.3.1-1
- Initial package.

@ -0,0 +1,101 @@
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.4-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 2.8.4-10
- Rebuilt for Python 3.11
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.4-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.4-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 2.8.4-7
- Rebuilt for Python 3.10
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Sun May 24 2020 Miro Hrončok <mhroncok@redhat.com> - 2.8.4-4
- Rebuilt for Python 3.9
* Thu Feb 20 2020 Javier Peña <jpena@redhat.com> - 2.8.4-3
- Add sphinx_rtd_theme as a buld dependency
* Thu Feb 20 2020 Javier Peña <jpena@redhat.com> - 2.8.4-2
- Fix name in autosetup
* Thu Feb 20 2020 Javier Peña <jpena@redhat.com> - 2.8.4-1
- Update to latest upstream version
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.6.0-13
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Sat Aug 17 2019 Miro Hrončok <mhroncok@redhat.com> - 2.6.0-12
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Jan 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.6.0-9
- Drop python2 subpackage
* Tue Jan 08 2019 Petr Viktorin <pviktori@redat.com> - 2.6.0-8
- Remove Fedora build dependency on a compatibility build of Django
- Use python3-sphinx on Fedora
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 2.6.0-6
- Rebuilt for Python 3.7
* Tue May 29 2018 Javier Peña <jpena@redhat.com> - 2.6.0-5
- Fix build due to Django dependency (bz#1556267)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Sat Jan 28 2017 Igor Gnatenko <ignatenko@redhat.com> - 2.6.0-1
- Update to 2.6.0
- Make package to comply guidelines
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 2.5.0-3
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.0-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Wed Feb 24 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 2.5.0-1
- Upstream 2.5.0
- Add python3 subpackage
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Jul 03 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 2.4.2-1
- Upstream 2.4.2
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Apr 01 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 2.4.1-1
- Upstream 2.4.1
* Mon Mar 30 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 2.3.1-1
- Initial package.

@ -0,0 +1,69 @@
%global pypi_name semantic_version
%global srcname python-semanticversion
Name: python-%{pypi_name}
Version: 2.10.0
Release: %autorelease
Summary: Library implementing the 'SemVer' scheme
License: BSD
URL: https://github.com/rbarrois/python-semanticversion
Source: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: make
BuildRequires: python3-devel
BuildRequires: python3-pytest
BuildRequires: sed
%global _description %{expand:
This small python library provides a few tools to handle semantic versioning in
Python.}
%description %{_description}
%package -n python3-%{pypi_name}
Summary: %{summary}
%description -n python3-%{pypi_name} %{_description}
%package doc
Summary: Documentation for python-%{pypi_name}
%description doc
%{summary}.
%prep
%autosetup -p1 -n %{srcname}-%{version}
# Drop unnecessary dependency
sed -i '/zest\.releaser\[recommended\]/d' setup.cfg
%generate_buildrequires
%pyproject_buildrequires -x doc
%build
%pyproject_wheel
# generate html docs
make -C docs html
# remove the sphinx-build leftovers
rm -rf docs/_build/html/.{doctrees,buildinfo}
%install
%pyproject_install
%pyproject_save_files %{pypi_name}
%check
%pytest
%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README.rst ChangeLog CREDITS
%files doc
%license LICENSE
%doc docs/_build/html
%changelog
%autochangelog

@ -0,0 +1 @@
SHA512 (python-semanticversion-2.10.0.tar.gz) = e060dd60db62663c6ebf21fdca33b2390d9bbad15fbdfa504221ab646426f09168caf00e79cee7ed4ef442c23fd587c9e421aa744990101ea626b58f4e320242
Loading…
Cancel
Save