diff --git a/python-imagesize.spec b/python-imagesize.spec index 45c33ab..55b22fa 100644 --- a/python-imagesize.spec +++ b/python-imagesize.spec @@ -1,10 +1,11 @@ +%bcond_without tests %global pypi_name imagesize %global sum Python module for analyzing image file headers and returning image sizes Name: python-%{pypi_name} Version: 1.2.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: %{sum} License: MIT @@ -12,9 +13,11 @@ URL: https://github.com/shibukawa/imagesize_py Source0: https://files.pythonhosted.org/packages/source/i/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch -BuildRequires: python3-setuptools -BuildRequires: python3-devel -BuildRequires: python3-pytest +BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: python%{python3_pkgversion}-devel +%if %{with tests} +BuildRequires: python%{python3_pkgversion}-pytest +%endif %description The imagesize package parses image file headers and returns the image sizes. @@ -26,11 +29,11 @@ The imagesize package parses image file headers and returns the image sizes. This is a pure Python library. -%package -n python3-%{pypi_name} +%package -n python%{python3_pkgversion}-%{pypi_name} Summary: %{sum} -%{?python_provide:%python_provide python3-%{pypi_name}} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} -%description -n python3-%{pypi_name} +%description -n python%{python3_pkgversion}-%{pypi_name} The imagesize package parses image file headers and returns the image sizes. * PNG @@ -51,15 +54,21 @@ rm -rf %{pypi_name}.egg-info %install %py3_install +%if %{with tests} %check py.test-3 +%endif -%files -n python3-%{pypi_name} +%files -n python%{python3_pkgversion}-%{pypi_name} %doc README.rst %license LICENSE.rst %{python3_sitelib}/* %changelog +* Mon Jan 18 2021 Avram Lubkin - 1.2.0-3 +- Use Python macros +- Add test conditional + * Wed Jul 29 2020 Fedora Release Engineering - 1.2.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild