diff --git a/python-re-assert.spec b/python-re-assert.spec index 7b6db7f..d79a5d4 100644 --- a/python-re-assert.spec +++ b/python-re-assert.spec @@ -1,54 +1,56 @@ -%global srcname re_assert -%global pkgname re-assert - -Name: python-%{pkgname} -Version: 1.1.0 -Release: %autorelease -Summary: Show where your regex match assertion failed! +Name: python-re-assert +Version: 1.1.0 +Release: %autorelease +Summary: Show where your regex match assertion failed # SPDX -License: MIT -URL: https://github.com/asottile/re-assert -# The PyPI sdist lacks the tests, so we must use the GitHub archive -Source0: %{url}/archive/v%{version}/re-assert-%{version}.tar.gz +License: MIT +URL: https://github.com/asottile/re-assert +Source0: %{url}/archive/v%{version}/re-assert-%{version}.tar.gz -BuildArch: noarch +BuildArch: noarch -BuildRequires: python3-devel -BuildRequires: python3dist(setuptools) +BuildRequires: python3-devel +BuildRequires: %{py3_dist setuptools} # For tests -BuildRequires: python3dist(pytest) -BuildRequires: python3dist(regex) +BuildRequires: %{py3_dist pytest} +BuildRequires: %{py3_dist regex} -%global _description %{expand: -Show where your regex match assertion failed!} +%global common_description %{expand: +%{summary}!} -%description %{_description} +%description %{common_description} -%package -n python3-%{pkgname} + +%package -n python3-re-assert Summary: %summary -%py_provides python3-%{pkgname} -%description -n python3-%{pkgname} %{_description} +%py_provides python3-re-assert +%description -n python3-re-assert %{common_description} + %prep -%autosetup -n %{pkgname}-%{version} +%autosetup -n re-assert-%{version} + %build %py3_build + %install %py3_install + %check %pytest -%files -n python3-%{pkgname} + +%files -n python3-re-assert %license LICENSE -%{python3_sitelib}/re_assert.py -%{python3_sitelib}/__pycache__/re_assert.*.pyc -%{python3_sitelib}/%{srcname}-*.egg-info/ + +%pycached %{python3_sitelib}/re_assert.py +%{python3_sitelib}/re_assert-%{version}-py%{python3_version}.egg-info/ %changelog