Upstream tag: 0.38.0 Upstream commit: a07560dd Commit authored by Packit automation (https://packit.dev/)
99 lines
2.8 KiB
RPMSpec
99 lines
2.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.38.0
|
|
#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 Jan 8 2026 Packit <hello@packit.dev> - 0.38.0-1
|
|
- A bug leading to incorrect EVR expansion has been fixed. (#492)
|
|
- Prevented side-effects during condition evaluation that could occur when expanding macros that manipulate other macros, leading to misinterpreted validity of condition branches. (#499)
|
|
|
|
* Fri Oct 3 2025 Packit <hello@packit.dev> - 0.37.1-1
|
|
- We have solved a FutureWarning in our codebase. (#485)
|
|
|
|
* Fri Sep 5 2025 Packit <hello@packit.dev> - 0.37.0-1
|
|
- Added support for Elbrus E2K CPU architectures. (#484)
|
|
|
|
* Fri May 30 2025 Packit <hello@packit.dev> - 0.36.0-1
|
|
- We have fixed a bug that caused specfile to traceback when section names with conditional macro expansions containing spaces were present in the spec file. (#476)
|
|
|
|
* Sun Apr 13 2025 Packit <hello@packit.dev> - 0.35.0-1
|
|
- Added support for creating Specfile instances from file objects and strings. (#458)
|
|
- The `context_management` type stubs now use `ParamSpec` from `typing_extensions` to support Python < 3.10. (#466)
|
|
|
|
* 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
|