updating the build script to the latest guidelines

This commit is contained in:
chedi toueiti
2022-10-14 22:05:07 +01:00
parent 125b050008
commit dd57d49bd8
2 changed files with 47 additions and 57 deletions
+33 -57
View File
@@ -1,74 +1,50 @@
%global srcname re_assert
%global pkgname re-assert
%global srcname re-assert
%global slugname re_assert
%global forgeurl https://github.com/asottile/re-assert
Name: python-%{pkgname}
Version: 1.1.0
Release: 7%{?dist}
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
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3dist(setuptools)
# For tests
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(regex)
%global _description %{expand:
%global common_description %{expand:
Show where your regex match assertion failed!}
%description %{_description}
%bcond_without tests
%package -n python3-%{pkgname}
Summary: %summary
Name: python-%{srcname}
Version: 1.1.0
%forgemeta
Release: %autorelease
Summary: Show where your regex match assertion failed!
URL: %{forgeurl}
Source: %{forgesource}
Patch: 0001_adding_pytest_to_the_testing_dependencies.patch
# SPDX
License: MIT
BuildArch: noarch
BuildRequires: python3-devel
%py_provides python3-%{pkgname}
%description -n python3-%{pkgname} %{_description}
%description %{common_description}
%package -n python3-%{srcname}
Summary: %{summary}
%description -n python3-%{srcname} %{common_description}
%prep
%autosetup -n %{pkgname}-%{version}
%forgeautosetup -p1
%generate_buildrequires
%pyproject_buildrequires %{?with_tests:-x test}
%build
%py3_build
%pyproject_wheel
%install
%py3_install
%pyproject_install
%pyproject_save_files %{slugname}
%if %{with tests}
%check
%pytest
%endif
%files -n python3-%{pkgname}
%license LICENSE
%{python3_sitelib}/re_assert.py
%{python3_sitelib}/__pycache__/re_assert.*.pyc
%{python3_sitelib}/%{srcname}-*.egg-info/
%files -n python3-%{srcname} -f %{pyproject_files}
%changelog
* Thu Oct 13 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 1.1.0-7
- Run the tests from the GitHub archive
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.1.0-5
- Rebuilt for Python 3.11
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.1.0-2
- Rebuilt for Python 3.10
* Sun Mar 21 2021 Chedi Toueiti <chedi.toueiti@gmail.com> - 1.1.0-1
- Initial commit
%autochangelog