diff --git a/python-flask-gravatar.spec b/python-flask-gravatar.spec index 2098ff8..9665beb 100644 --- a/python-flask-gravatar.spec +++ b/python-flask-gravatar.spec @@ -1,52 +1,65 @@ %global pkg_name flask-gravatar -%global mod_name Flask-Gravatar -Name: python-%{pkg_name} -Version: 0.5.0 -Release: 12%{?dist} -Summary: Small extension for Flask to make usage of Gravatar service easy -License: BSD -URL: http://github.com/zzzsochi/%{mod_name}/ -Source0: https://files.pythonhosted.org/packages/source/F/%{mod_name}/%{mod_name}-%{version}.tar.gz -BuildArch: noarch +Name: python-%{pkg_name} +Version: 0.5.0 +Release: 14%{?dist} +Summary: Small extension for Flask to make usage of Gravatar service easy + +License: BSD +URL: https://github.com/zzzsochi/Flask-Gravatar/ +BuildArch: noarch +Source0: %{pypi_source Flask-Gravatar} +# Don't test pep8 as python-pytest-pep8 is obsolete +# Don't run linting tests +# Don't add flask_gravatar src folder to test path, buildroot path is already added by %%pytest +Patch0: python-flask-gravatar_tests.patch + +BuildRequires: python3-devel -BuildRequires: python%{python3_pkgversion}-devel -Buildrequires: python%{python3_pkgversion}-pytest-runner %description Small extension for Flask to make usage of Gravatar service easy. -%package -n python%{python3_pkgversion}-%{pkg_name} +%package -n python3-%{pkg_name} Summary: Small extension for Flask to make usage of Gravatar service easy -Requires: python%{python3_pkgversion}-flask -%{?python_provide:%python_provide python%{python3_pkgversion}-%{pkg_name}} -%description -n python%{python3_pkgversion}-%{pkg_name} + +%description -n python3-%{pkg_name} Small extension for Flask to make usage of Gravatar service easy. + %prep -%setup -q -n %{mod_name}-%{version} +%autosetup -p1 -n Flask-Gravatar-%{version} + + +%generate_buildrequires +%pyproject_buildrequires -r -x tests %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files flask_gravatar + +%check +%pytest -%files -n python%{python3_pkgversion}-%{pkg_name} +%files -n python-%{pkg_name} -f %{pyproject_files} %doc README.rst CHANGES.rst RELEASE-NOTES.rst AUTHORS %license LICENSE -%dir %{python3_sitelib}/flask_gravatar/ -%dir %{python3_sitelib}/flask_gravatar/__pycache__/ -%{python3_sitelib}/flask_gravatar/*.py -%{python3_sitelib}/flask_gravatar/__pycache__/*.py* -%{python3_sitelib}/Flask_Gravatar*.egg-info/ %changelog +* Fri Dec 24 2021 Sandro Mani - 0.5.0-14 +- Run %%pytest + +* Wed Dec 08 2021 Sandro Mani - 0.5.0-13 +- Revive package + * Wed Jan 27 2021 Fedora Release Engineering - 0.5.0-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/python-flask-gravatar_tests.patch b/python-flask-gravatar_tests.patch new file mode 100644 index 0000000..69c46b4 --- /dev/null +++ b/python-flask-gravatar_tests.patch @@ -0,0 +1,31 @@ +diff -rupN Flask-Gravatar-0.5.0/pytest.ini Flask-Gravatar-0.5.0-new/pytest.ini +--- Flask-Gravatar-0.5.0/pytest.ini 2021-12-27 14:03:57.303596836 +0100 ++++ Flask-Gravatar-0.5.0-new/pytest.ini 2021-12-27 13:56:07.050309138 +0100 +@@ -12,7 +12,7 @@ + + + [pytest] +-addopts = --pep8 --doctest-glob="*.rst" --doctest-modules --cov=flask_gravatar --cov-report=term-missing ++addopts = --doctest-glob="*.rst" --doctest-modules + pep8ignore = docs/conf.py ALL \ + docs/_themes/flask_theme_support.py ALL +-testpaths = docs tests flask_gravatar ++testpaths = docs tests +diff -rupN Flask-Gravatar-0.5.0/setup.py Flask-Gravatar-0.5.0-new/setup.py +--- Flask-Gravatar-0.5.0/setup.py 2021-12-27 14:03:57.307596835 +0100 ++++ Flask-Gravatar-0.5.0-new/setup.py 2021-12-27 14:03:51.880597152 +0100 +@@ -17,13 +17,8 @@ readme = open('README.rst').read() + history = open('CHANGES.rst').read() + + tests_require = [ +- 'check-manifest>=0.25', +- 'coverage>=4.0', +- 'isort>=4.2.2', +- 'pydocstyle>=1.0.0', ++ 'pygments>=2.0.0', + 'pytest-cache>=1.0', +- 'pytest-cov>=1.8.0', +- 'pytest-pep8>=1.0.6', + 'pytest>=2.8.0', + ] +