diff --git a/anda/buildsys/ops2deb/anda.hcl b/anda/buildsys/ops2deb/anda.hcl index e905d2a0a3..623da4511b 100644 --- a/anda/buildsys/ops2deb/anda.hcl +++ b/anda/buildsys/ops2deb/anda.hcl @@ -1,6 +1,6 @@ project pkg { - arches = ["x86_64"] - rpm { - spec = "ops2deb.spec" + arches = ["x86_64"] + rpm { + spec = "ops2deb.spec" } } diff --git a/anda/buildsys/ops2deb/ops2deb.spec b/anda/buildsys/ops2deb/ops2deb.spec index da677895e3..1c7238a971 100644 --- a/anda/buildsys/ops2deb/ops2deb.spec +++ b/anda/buildsys/ops2deb/ops2deb.spec @@ -1,43 +1,50 @@ -%global debug_package %nil -%define _python_dist_allow_version_zero # upstream issue? +%global pypi_name ops2deb +%global _desc Generate Debian packages for common devops tools such as kubectl, kustomize, helm. -Name: python3-ops2deb +Name: python-%{pypi_name} Version: 2.7.0 Release: 1%?dist -Summary: Generate Debian packages for common devops tools +Summary: Generate Debian packages for common devops tools such as kubectl, kustomize, helm License: MIT URL: https://github.com/upciti/ops2deb -Source0: %url/archive/refs/tags/%version.tar.gz -BuildRequires: python3-devel poetry python3.10 -BuildRequires: python3dist(setuptools) -BuildArch: noarch +Source0: %{pypi_source} +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-pip +BuildRequires: python3-poetry + +Packager: Owen Zimmerman %description -ops2deb is designed to generate Debian packages for common devops tools, but -can be used to package any portable application. It consumes a configuration -file and outputs .deb packages. ops2deb can also track new releases of upstream -applications and automatically bump application versions in its configuration -file. +%_desc +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +%_desc %prep -%autosetup -n ops2deb-%version +%autosetup -n %{pypi_name}-%{version} +sed -i 's/python = ">=3.10,<3.12"/python = ">=3.10"/' pyproject.toml %build -poetry build +%pyproject_wheel %install -python3.10 -m ensurepip -python3.10 -m pip install installer -python3.10 -m installer --destdir=%buildroot dist/*.whl -rm -rf %buildroot/%python3_sitelib/*/__pycache__ +%pyproject_install +%pyproject_save_files %{pypi_name} -%files -%license LICENSE +%files -n python3-%{pypi_name} -f %{pyproject_files} %doc README.md -/usr/bin/ops2deb -/usr/lib/python3*/site-packages/ops2deb* +%license LICENSE +%{_bindir}/ops2deb %changelog +* Thu Apr 23 2026 Owen Zimmerman +- Switch to modern python packaging methods + * Fri Apr 28 2023 madonuko - 2.4.1-1 - Initial package.