- Resolves: rhbz#2344364 Upstream tag: 0.34.2 Upstream commit: 875f03ed Commit authored by Packit automation (https://packit.dev/)
82 lines
1.8 KiB
RPMSpec
82 lines
1.8 KiB
RPMSpec
%bcond_with tests
|
|
|
|
|
|
%global desc %{expand:
|
|
Python library for parsing and manipulating RPM spec files.
|
|
Main focus is on modifying existing spec files, any change should result
|
|
in a minimal diff.}
|
|
|
|
|
|
%global base_version 0.34.2
|
|
#global prerelease rc1
|
|
|
|
%global package_version %{base_version}%{?prerelease:~%{prerelease}}
|
|
%global pypi_version %{base_version}%{?prerelease}
|
|
|
|
|
|
Name: python-specfile
|
|
Version: %{package_version}
|
|
Release: 1%{?dist}
|
|
|
|
Summary: A library for parsing and manipulating RPM spec files
|
|
License: MIT
|
|
URL: https://github.com/packit/specfile
|
|
|
|
Source0: %{pypi_source specfile %{pypi_version}}
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: python3-devel
|
|
%if %{with tests}
|
|
# tests/unit/test_guess_packager.py
|
|
BuildRequires: git-core
|
|
%endif
|
|
|
|
|
|
%description
|
|
%{desc}
|
|
|
|
|
|
%package -n python%{python3_pkgversion}-specfile
|
|
Summary: %{summary}
|
|
|
|
|
|
%description -n python%{python3_pkgversion}-specfile
|
|
%{desc}
|
|
|
|
|
|
%prep
|
|
%autosetup -p1 -n specfile-%{pypi_version}
|
|
|
|
# since we are building from PyPI source, we don't need git-archive
|
|
# support in setuptools_scm
|
|
sed -i 's/setuptools_scm\[toml\]>=7/setuptools_scm[toml]/' pyproject.toml
|
|
|
|
|
|
%generate_buildrequires
|
|
%pyproject_buildrequires %{?with_tests: -x testing}
|
|
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
|
|
%install
|
|
%pyproject_install
|
|
%pyproject_save_files specfile
|
|
|
|
|
|
%if %{with tests}
|
|
%check
|
|
%pytest --verbose tests/unit tests/integration
|
|
%endif
|
|
|
|
|
|
%files -n python%{python3_pkgversion}-specfile -f %{pyproject_files}
|
|
%doc README.md
|
|
|
|
|
|
%changelog
|
|
* Thu Mar 20 2025 Packit <hello@packit.dev> - 0.34.2-1
|
|
- context_management: add a type stub override to fix typing. Type checkers like mypy and pyright can now correctly determine the types for `.sources()`, `.sections()`, and the other `Specfile` methods that return context managers. (#457)
|
|
- Resolves: rhbz#2344364
|