import python-rpmautospec-0.4.1-2.el9

i9e changed/i9ce/python-rpmautospec-0.4.1-2.el9
MSVSphere Packaging Team 10 months ago
parent 44d904034f
commit b1295b69a6

2
.gitignore vendored

@ -1 +1 @@
SOURCES/rpmautospec-0.3.5.tar.gz
SOURCES/rpmautospec-0.4.1.tar.gz

@ -1 +1 @@
66393fce15f30ea1824808d5013f8c47176493e3 SOURCES/rpmautospec-0.3.5.tar.gz
e60644797a0366a2d6e08750f173358b443ae141 SOURCES/rpmautospec-0.4.1.tar.gz

@ -0,0 +1,12 @@
diff -up rpmautospec-0.4.1/pyproject.toml.old-poetry rpmautospec-0.4.1/pyproject.toml
--- rpmautospec-0.4.1/pyproject.toml.old-poetry 2023-12-15 23:05:03.757565500 +0100
+++ rpmautospec-0.4.1/pyproject.toml 2024-01-08 15:32:14.863630739 +0100
@@ -47,7 +47,7 @@ babel = "^2.9"
pygit2 = "^1.2.1"
rpm = "*"
-[tool.poetry.group.dev.dependencies]
+[tool.poetry.dev-dependencies]
pyyaml = "^5.3.1 || ^6"
pytest = "^6.2.2 || ^7"
pytest-cov = "^4.0.0"

@ -1,149 +1,165 @@
## START: Set by rpmautospec
## (rpmautospec version 0.3.1)
## (rpmautospec version 0.3.5)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 1;
release_number = 2;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
# when bootstrapping Python, pytest-xdist is not yet available
%bcond_without xdist
%bcond xdist %{undefined rhel}
%global srcname rpmautospec
Name: python-rpmautospec
Version: 0.3.5
Release: %autorelease
Summary: Package and CLI tool to generate release fields and changelogs
# Package the placeholder rpm-macros (moved to redhat-rpm-config in F40)
%if ! (0%{?fedora} >= 40 || 0%{?rhel} >= 10)
%bcond rpmmacropkg 1
%else
%bcond rpmmacropkg 0
%endif
License: MIT
URL: https://pagure.io/fedora-infra/rpmautospec
Source0: https://releases.pagure.org/fedora-infra/rpmautospec/rpmautospec-%{version}.tar.gz
# Appease old Poetry versions (<1.2.0a2)
%if ! 0%{?fedora}%{?rhel} || 0%{?fedora} >= 38 || 0%{?rhel} >= 10
%bcond oldpoetry 0
%else
%bcond oldpoetry 1
%endif
BuildArch: noarch
BuildRequires: git
%global srcname rpmautospec
%global canonicalname %{py_dist_name %{srcname}}
Name: python-%{canonicalname}
Version: 0.4.1
Release: %autorelease
Summary: Package and CLI tool to generate release fields and changelogs
License: MIT
URL: https://github.com/fedora-infra/%{canonicalname}
Source0: https://github.com/fedora-infra/%{canonicalname}/releases/download/%{version}/%{canonicalname}-%{version}.tar.gz
Patch100: rpmautospec-0.4.1-old-poetry.patch
BuildArch: noarch
BuildRequires: git
# the langpacks are needed for tests
BuildRequires: glibc-langpack-de
BuildRequires: glibc-langpack-en
BuildRequires: python3-devel >= 3.6.0
BuildRequires: python3-setuptools
BuildRequires: koji
BuildRequires: python%{python3_pkgversion}-babel
BuildRequires: python3-koji
BuildRequires: python3-pygit2
BuildRequires: python%{python3_pkgversion}-pytest
BuildRequires: python%{python3_pkgversion}-pytest-cov
BuildRequires: glibc-langpack-de
BuildRequires: glibc-langpack-en
BuildRequires: python3-devel >= 3.9.0
# The dependencies needed for testing dont get auto-generated.
BuildRequires: python3dist(pytest)
%if %{with xdist}
BuildRequires: python%{python3_pkgversion}-pytest-xdist
BuildRequires: python3dist(pytest-xdist)
%endif
BuildRequires: python%{python3_pkgversion}-pyyaml
Obsoletes: koji-hub-plugin-rpmautospec < 0.1.5-2
Conflicts: koji-hub-plugin-rpmautospec < 0.1.5-2
BuildRequires: python3dist(pyyaml)
BuildRequires: sed
%global _description %{expand:
A package and CLI tool to generate RPM release fields and changelogs.}
%description %_description
# package the library
%package -n python3-%{srcname}
Summary: %{summary}
%package -n python3-%{canonicalname}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{srcname}}
Requires: koji
Requires: python3-babel
Requires: python3-koji
Requires: python3-pygit2
Requires: rpm
# for "rpm --specfile"
Requires: rpm-build >= 4.9
%description -n python3-%{srcname} %_description
# Note that there is no %%files section for the unversioned python module
%files -n python3-%{srcname}
%license LICENSE
%doc README.rst
%{python3_sitelib}/%{srcname}-*.egg-info
%{python3_sitelib}/%{srcname}/
# package the cli tool
%description -n python3-%{canonicalname} %_description
%package -n %{srcname}
%package -n %{canonicalname}
Summary: CLI tool for generating RPM releases and changelogs
Requires: python3-%{srcname} = %{version}-%{release}
Requires: python3-%{canonicalname} = %{version}-%{release}
%description -n %{srcname}
%description -n %{canonicalname}
CLI tool for generating RPM releases and changelogs
%files -n %{srcname}
%{_bindir}/rpmautospec
# package the Koji plugins
%package -n koji-builder-plugin-rpmautospec
Summary: Koji plugin for generating RPM releases and changelogs
Requires: python3-%{srcname} = %{version}-%{release}
Requires: python3-koji
Requires: koji-builder-plugins
%description -n koji-builder-plugin-rpmautospec
A Koji plugin for generating RPM releases and changelogs.
%files -n koji-builder-plugin-rpmautospec
%{_prefix}/lib/koji-builder-plugins/*
# Package the placeholder rpm-macros
%if %{with rpmmacropkg}
%package -n rpmautospec-rpm-macros
Summary: Rpmautospec RPM macros for local rpmbuild
Requires: rpm
%description -n rpmautospec-rpm-macros
RPM macros with placeholders for building rpmautospec enabled packages localy
%files -n rpmautospec-rpm-macros
%{rpmmacrodir}/macros.rpmautospec
This package contains RPM macros with placeholders for building rpmautospec
enabled packages locally.
%endif
#--------------------------------------------------------
%generate_buildrequires
%pyproject_buildrequires
%prep
%autosetup -n %{srcname}-%{version}
# The python3-koji package doesn't declare itself properly, so we may not depend on it when
# installed as an RPM.
sed -i /koji/d requirements.txt
%autosetup -n %{srcname}-%{version} -N
%autopatch -M 99
%if %{with oldpoetry}
%autopatch 100
%endif
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
sed -i -e '/pytest-cov/d' pyproject.toml
%build
%py3_build
%pyproject_wheel
%install
%py3_install
mkdir -p %{buildroot}%{_prefix}/lib/koji-builder-plugins/
install -m 0644 koji_plugins/rpmautospec_builder.py \
%{buildroot}%{_prefix}/lib/koji-builder-plugins/
%py_byte_compile %{python3} %{buildroot}%{_prefix}/lib/koji-builder-plugins/
%pyproject_install
%pyproject_save_files %{srcname}
# Work around poetry not listing license files as such in package metadata.
sed -i -e 's|^\(.*/LICENSE\)|%%license \1|g' %{pyproject_files}
# RPM macros
%if %{with rpmmacropkg}
mkdir -p %{buildroot}%{rpmmacrodir}
install -m 644 rpm/macros.d/macros.rpmautospec %{buildroot}%{rpmmacrodir}/
%endif
%check
PYTHONPATH="%{buildroot}%{python3_sitelib}" \
%{__python3} -m pytest \
%pytest -v \
%if %{with xdist}
--numprocesses=auto
%endif
%files -n python3-%{canonicalname} -f %{pyproject_files}
%doc README.rst
%files -n %{canonicalname}
%{_bindir}/rpmautospec
%if %{with rpmmacropkg}
%files -n rpmautospec-rpm-macros
%{rpmmacrodir}/macros.rpmautospec
%endif
%changelog
* Sat Nov 18 2023 Arkady L. Shane <tigro@msvsphere-os.ru> - 0.3.5-1
* Mon Jan 08 2024 Nils Philippsen <nils@redhat.com> - 0.4.1-2
- Update patch for old poetry versions
* Fri Dec 15 2023 Nils Philippsen <nils@redhat.com> - 0.4.1-1
- Update to 0.4.1
* Sun Dec 03 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 0.4.0-2
- Drop unwanted python-pytest-cov dependency
* Thu Nov 30 2023 Nils Philippsen <nils@redhat.com> - 0.4.0-1
- Update to 0.4.0
* Sat Nov 18 2023 Arkady L. Shane <tigro@msvsphere-os.ru> - 0.3.8-1
- Rebuilt for MSVSphere 9.2
* Tue Nov 14 2023 Nils Philippsen <nils@redhat.com> - 0.3.8-1
- Update to 0.3.8
* Tue Nov 14 2023 Nils Philippsen <nils@redhat.com> - 0.3.7-1
- Update to 0.3.7
* Tue Nov 14 2023 Nils Philippsen <nils@redhat.com> - 0.3.6-1
- Update to 0.3.6
* Tue Aug 22 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 0.3.5-5
- Disable the macros subpackage in F40+
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 0.3.5-3
- Rebuilt for Python 3.12
* Wed May 24 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 0.3.5-2
- Avoid pytest-cov, disable xdist in RHEL builds
* Wed Feb 08 2023 Nils Philippsen <nils@redhat.com> - 0.3.5-1
- Update to 0.3.5

Loading…
Cancel
Save