- Resolves: rhbz#2446536 Upstream tag: 0.40.1 Upstream commit: 19853920 Commit authored by Packit automation (https://packit.dev/)
115 lines
3.6 KiB
RPMSpec
115 lines
3.6 KiB
RPMSpec
%bcond_without 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.40.1
|
|
#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
|
|
|
|
# system-rpm-config pulls in packages containing SRPM macros
|
|
# necessary for spec file preprocessing and parsing
|
|
Recommends: system-rpm-config
|
|
|
|
|
|
%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
|
|
* Wed Mar 25 2026 Packit <hello@packit.dev> - 0.40.1-1
|
|
- Fixed issues related to introduced sanitization (#523, #524, #525).
|
|
- Resolves: rhbz#2446536
|
|
|
|
* Wed Mar 11 2026 Packit <hello@packit.dev> - 0.40.0-1
|
|
- `Specfile()` has a new `sanitize` option that enables best effort sanitization of potentially dangerous constructs such as shell expansions and unsafe Lua macros before they are passed to RPM for parsing. (#519)
|
|
- Fixed incorrect parsing of nested macros. (#522)
|
|
|
|
* Sat Feb 14 2026 Packit <hello@packit.dev> - 0.39.1-1
|
|
- Fixed whitespace padding of day of month in changelog entries. (#511)
|
|
- Resolves: rhbz#2393435
|
|
|
|
* 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
|